@convo-lang/convo-lang
Version:
The language of AI
18 lines • 604 B
JavaScript
import { httpClient, isHttp } from "@iyio/common";
export class ConvoHttpImportService {
canImport(path) {
return isHttp(path);
}
async handleImport(_import) {
const path = _import.targetPath ?? _import.name;
const isConvo = path?.toLowerCase().endsWith('.convo');
const file = await httpClient().getStringAsync(path);
return {
name: _import.name,
convo: isConvo ? file : undefined,
content: isConvo ? undefined : file,
filePath: path
};
}
}
//# sourceMappingURL=ConvoHttpImportService.js.map