From 7f8694ff26e065181f11acf1ce55f63df4dd410a Mon Sep 17 00:00:00 2001 From: "bobo.yang" Date: Sat, 3 Feb 2024 16:12:37 +0800 Subject: [PATCH] feat: Add path property to command struct - Include 'path' field in Command interface for directory awareness - Add 'path' to command object creation for devchat run listing - Update CommandEntry interface in devchat tool wrapper to hold 'path' --- src/handler/workflowCommandHandler.ts | 2 ++ src/toolwrapper/devchat.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/src/handler/workflowCommandHandler.ts b/src/handler/workflowCommandHandler.ts index 6e47a7b..3b40bd7 100644 --- a/src/handler/workflowCommandHandler.ts +++ b/src/handler/workflowCommandHandler.ts @@ -9,6 +9,7 @@ export interface Command { name: string; pattern: string; description: string; + path: string; args: number; handler: (commandName: string, userInput: string) => Promise; } @@ -24,6 +25,7 @@ async function getCommandListByDevChatRun(includeHide: boolean = false): Promise name: command.name, pattern: command.name, description: command.description, + path: command.path, args: 0, handler: async (commandName: string, userInput: string) => { return ''; } }; diff --git a/src/toolwrapper/devchat.ts b/src/toolwrapper/devchat.ts index 37b3f63..ae3f870 100644 --- a/src/toolwrapper/devchat.ts +++ b/src/toolwrapper/devchat.ts @@ -41,6 +41,7 @@ export interface LogEntry { export interface CommandEntry { name: string; description: string; + path: string; } export interface TopicEntry {