feat: subagent list dialog - working

This commit is contained in:
tanzhenxin
2025-09-04 16:34:51 +08:00
parent 9fcc7a4cbe
commit e44e28a640
24 changed files with 1340 additions and 307 deletions

View File

@@ -52,6 +52,7 @@ export const useSlashCommandProcessor = (
openPrivacyNotice: () => void,
openSettingsDialog: () => void,
openSubagentCreateDialog: () => void,
openAgentsManagerDialog: () => void,
toggleVimEnabled: () => Promise<boolean>,
setIsProcessing: (isProcessing: boolean) => void,
setGeminiMdFileCount: (count: number) => void,
@@ -352,16 +353,19 @@ export const useSlashCommandProcessor = (
toolArgs: result.toolArgs,
};
case 'message':
addItem(
{
type:
result.messageType === 'error'
? MessageType.ERROR
: MessageType.INFO,
text: result.content,
},
Date.now(),
);
if (result.messageType === 'info') {
addMessage({
type: MessageType.INFO,
content: result.content,
timestamp: new Date(),
});
} else {
addMessage({
type: MessageType.ERROR,
content: result.content,
timestamp: new Date(),
});
}
return { type: 'handled' };
case 'dialog':
switch (result.dialog) {
@@ -383,6 +387,9 @@ export const useSlashCommandProcessor = (
case 'subagent_create':
openSubagentCreateDialog();
return { type: 'handled' };
case 'subagent_list':
openAgentsManagerDialog();
return { type: 'handled' };
case 'help':
return { type: 'handled' };
default: {
@@ -558,6 +565,7 @@ export const useSlashCommandProcessor = (
setQuittingMessages,
openSettingsDialog,
openSubagentCreateDialog,
openAgentsManagerDialog,
setShellConfirmationRequest,
setSessionShellAllowlist,
setIsProcessing,