Merge pull request #11935 from continuedev/configs-support
This commit is contained in:
commit
a3dbeb346b
2 changed files with 12 additions and 13 deletions
|
|
@ -359,17 +359,15 @@ export class ConfigHandler {
|
|||
}
|
||||
|
||||
if (options.includeWorkspace) {
|
||||
const assistantFiles = await getAllDotContinueDefinitionFiles(
|
||||
this.ide,
|
||||
{ ...options, fileExtType: "yaml" },
|
||||
"assistants",
|
||||
);
|
||||
const agentFiles = await getAllDotContinueDefinitionFiles(
|
||||
this.ide,
|
||||
{ ...options, fileExtType: "yaml" },
|
||||
"agents",
|
||||
);
|
||||
const profiles = [...assistantFiles, ...agentFiles].map((assistant) => {
|
||||
const yamlOptions = { ...options, fileExtType: "yaml" } as const;
|
||||
const allFiles = (
|
||||
await Promise.all([
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "assistants"),
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "agents"),
|
||||
getAllDotContinueDefinitionFiles(this.ide, yamlOptions, "configs"),
|
||||
])
|
||||
).flat();
|
||||
const profiles = allFiles.map((assistant) => {
|
||||
return new LocalProfileLoader(
|
||||
this.ide,
|
||||
this.controlPlaneClient,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export function isContinueConfigRelatedUri(uri: string): boolean {
|
|||
(uri.endsWith(".yaml") ||
|
||||
uri.endsWith(".yml") ||
|
||||
uri.endsWith(".json"))) ||
|
||||
[...BLOCK_TYPES, "agents", "assistants"].some((blockType) =>
|
||||
[...BLOCK_TYPES, "agents", "assistants", "configs"].some((blockType) =>
|
||||
uri.includes(`.continue/${blockType}`),
|
||||
)
|
||||
);
|
||||
|
|
@ -38,7 +38,8 @@ export function isContinueAgentConfigFile(uri: string): boolean {
|
|||
const normalizedUri = URI.normalize(uri);
|
||||
return (
|
||||
normalizedUri.includes(`/.continue/agents/`) ||
|
||||
normalizedUri.includes(`/.continue/assistants/`)
|
||||
normalizedUri.includes(`/.continue/assistants/`) ||
|
||||
normalizedUri.includes(`/.continue/configs/`)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue