diff --git a/src/agents/workflow/WorkflowSchema.ts b/src/agents/workflow/WorkflowSchema.ts index 4d75bf4..ff03f2f 100644 --- a/src/agents/workflow/WorkflowSchema.ts +++ b/src/agents/workflow/WorkflowSchema.ts @@ -26,17 +26,28 @@ export type StepProvide = { description?: string; }; -export type FollowUp = - | { - title: string; - message: string; - } - | { - title: string; - commandId: string; - args?: any[]; - when?: string; - }; +export type FollowUp = { + /** + * The message to send to the chat. + */ + prompt: string; + + /** + * A title to show the user. The prompt will be shown by default, when this is unspecified. + */ + label?: string; + + /** + * By default, the followup goes to the same participant/command. But this property can be set to invoke a different participant. + * Followups can only invoke a participant that was contributed by the same extension. + */ + participant?: string; + + /** + * By default, the followup goes to the same participant/command. But this property can be set to invoke a different command. + */ + command?: string; +}; /** * A Step defines an entry point for a step in the workflow. diff --git a/src/tools/impl/read_file.ts b/src/tools/impl/read_file.ts index 203c551..b06f075 100644 --- a/src/tools/impl/read_file.ts +++ b/src/tools/impl/read_file.ts @@ -2,6 +2,7 @@ import { ToolManager } from '../ToolManager'; import { ToolContext } from '../ToolTypes'; import { getAbsolutePathInWorkspace } from '../../utils/fileUtils'; import { fileStorage } from '../../utils/fileStorage'; +import path from 'path'; export const TOOL_READ_FILE = 'read_file'; export const TOOL_READ_FILES = 'read_files'; @@ -17,7 +18,7 @@ const read_file = async (context: ToolContext, filename: string, encoding?: Buff context.onProgress({ type: 'inlineContentReference', - title: `\nAgent called \`read_file('${filePath}')\`\n`, + title: `read_file('${path.basename(filePath)}')`, inlineReference: filePath, }); diff --git a/src/tools/impl/write_file.ts b/src/tools/impl/write_file.ts index dacc388..84e7e07 100644 --- a/src/tools/impl/write_file.ts +++ b/src/tools/impl/write_file.ts @@ -2,6 +2,7 @@ import { ToolManager } from '../ToolManager'; import { ToolContext } from '../ToolTypes'; import { getAbsolutePathInWorkspace } from '../../utils/fileUtils'; import { fileStorage } from '../../utils/fileStorage'; +import path from 'path'; export const TOOL_WRITE_FILE = 'write_file'; @@ -17,7 +18,7 @@ const write_file = async (context: ToolContext, filename: string, contents: stri context.onProgress({ type: 'inlineContentReference', - title: `\nwrite_file(${filename})\n`, + title: `write_file(${path.basename(filename)})`, inlineReference: filePath, }); };