codemate-ai 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/dist/src/agents/base/Agent.d.ts +13 -0
- package/dist/src/agents/base/Agent.d.ts.map +1 -0
- package/dist/src/agents/base/Agent.js +10 -0
- package/dist/src/agents/base/Agent.js.map +1 -0
- package/dist/src/agents/builtin/ExploreAgent.d.ts +13 -0
- package/dist/src/agents/builtin/ExploreAgent.d.ts.map +1 -0
- package/dist/src/agents/builtin/ExploreAgent.js +71 -0
- package/dist/src/agents/builtin/ExploreAgent.js.map +1 -0
- package/dist/src/agents/builtin/GeneralAgent.d.ts +13 -0
- package/dist/src/agents/builtin/GeneralAgent.d.ts.map +1 -0
- package/dist/src/agents/builtin/GeneralAgent.js +80 -0
- package/dist/src/agents/builtin/GeneralAgent.js.map +1 -0
- package/dist/src/agents/builtin/PlanAgent.d.ts +15 -0
- package/dist/src/agents/builtin/PlanAgent.d.ts.map +1 -0
- package/dist/src/agents/builtin/PlanAgent.js +85 -0
- package/dist/src/agents/builtin/PlanAgent.js.map +1 -0
- package/dist/src/application/Application.d.ts +28 -0
- package/dist/src/application/Application.d.ts.map +1 -0
- package/dist/src/application/Application.js +209 -0
- package/dist/src/application/Application.js.map +1 -0
- package/dist/src/application/Container.d.ts +14 -0
- package/dist/src/application/Container.d.ts.map +1 -0
- package/dist/src/application/Container.js +47 -0
- package/dist/src/application/Container.js.map +1 -0
- package/dist/src/cli.d.ts +3 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +54 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/code/CodeEditor.d.ts +9 -0
- package/dist/src/code/CodeEditor.d.ts.map +1 -0
- package/dist/src/code/CodeEditor.js +61 -0
- package/dist/src/code/CodeEditor.js.map +1 -0
- package/dist/src/code/CodeLocator.d.ts +8 -0
- package/dist/src/code/CodeLocator.d.ts.map +1 -0
- package/dist/src/code/CodeLocator.js +111 -0
- package/dist/src/code/CodeLocator.js.map +1 -0
- package/dist/src/code/CodeParser.d.ts +6 -0
- package/dist/src/code/CodeParser.d.ts.map +1 -0
- package/dist/src/code/CodeParser.js +32 -0
- package/dist/src/code/CodeParser.js.map +1 -0
- package/dist/src/code/types.d.ts +21 -0
- package/dist/src/code/types.d.ts.map +1 -0
- package/dist/src/code/types.js +2 -0
- package/dist/src/code/types.js.map +1 -0
- package/dist/src/commands/base/SlashCommand.d.ts +14 -0
- package/dist/src/commands/base/SlashCommand.d.ts.map +1 -0
- package/dist/src/commands/base/SlashCommand.js +14 -0
- package/dist/src/commands/base/SlashCommand.js.map +1 -0
- package/dist/src/commands/model/ModelCommand.d.ts +10 -0
- package/dist/src/commands/model/ModelCommand.d.ts.map +1 -0
- package/dist/src/commands/model/ModelCommand.js +20 -0
- package/dist/src/commands/model/ModelCommand.js.map +1 -0
- package/dist/src/commands/performance/PerformanceCommand.d.ts +12 -0
- package/dist/src/commands/performance/PerformanceCommand.d.ts.map +1 -0
- package/dist/src/commands/performance/PerformanceCommand.js +22 -0
- package/dist/src/commands/performance/PerformanceCommand.js.map +1 -0
- package/dist/src/commands/session/ClearCommand.d.ts +9 -0
- package/dist/src/commands/session/ClearCommand.d.ts.map +1 -0
- package/dist/src/commands/session/ClearCommand.js +19 -0
- package/dist/src/commands/session/ClearCommand.js.map +1 -0
- package/dist/src/commands/session/ExitCommand.d.ts +9 -0
- package/dist/src/commands/session/ExitCommand.d.ts.map +1 -0
- package/dist/src/commands/session/ExitCommand.js +12 -0
- package/dist/src/commands/session/ExitCommand.js.map +1 -0
- package/dist/src/commands/session/HelpCommand.d.ts +9 -0
- package/dist/src/commands/session/HelpCommand.d.ts.map +1 -0
- package/dist/src/commands/session/HelpCommand.js +44 -0
- package/dist/src/commands/session/HelpCommand.js.map +1 -0
- package/dist/src/commands/session/SessionsCommand.d.ts +9 -0
- package/dist/src/commands/session/SessionsCommand.d.ts.map +1 -0
- package/dist/src/commands/session/SessionsCommand.js +26 -0
- package/dist/src/commands/session/SessionsCommand.js.map +1 -0
- package/dist/src/commands/snapshot/RewindCommand.d.ts +9 -0
- package/dist/src/commands/snapshot/RewindCommand.d.ts.map +1 -0
- package/dist/src/commands/snapshot/RewindCommand.js +43 -0
- package/dist/src/commands/snapshot/RewindCommand.js.map +1 -0
- package/dist/src/commands/snapshot/SnapshotsCommand.d.ts +9 -0
- package/dist/src/commands/snapshot/SnapshotsCommand.d.ts.map +1 -0
- package/dist/src/commands/snapshot/SnapshotsCommand.js +25 -0
- package/dist/src/commands/snapshot/SnapshotsCommand.js.map +1 -0
- package/dist/src/commands/spec/SpecCreateCommand.d.ts +9 -0
- package/dist/src/commands/spec/SpecCreateCommand.d.ts.map +1 -0
- package/dist/src/commands/spec/SpecCreateCommand.js +22 -0
- package/dist/src/commands/spec/SpecCreateCommand.js.map +1 -0
- package/dist/src/commands/spec/SpecListCommand.d.ts +9 -0
- package/dist/src/commands/spec/SpecListCommand.d.ts.map +1 -0
- package/dist/src/commands/spec/SpecListCommand.js +15 -0
- package/dist/src/commands/spec/SpecListCommand.js.map +1 -0
- package/dist/src/commands/spec/SpecShowCommand.d.ts +9 -0
- package/dist/src/commands/spec/SpecShowCommand.d.ts.map +1 -0
- package/dist/src/commands/spec/SpecShowCommand.js +21 -0
- package/dist/src/commands/spec/SpecShowCommand.js.map +1 -0
- package/dist/src/managers/AgentManager.d.ts +19 -0
- package/dist/src/managers/AgentManager.d.ts.map +1 -0
- package/dist/src/managers/AgentManager.js +47 -0
- package/dist/src/managers/AgentManager.js.map +1 -0
- package/dist/src/managers/PluginManager.d.ts +23 -0
- package/dist/src/managers/PluginManager.d.ts.map +1 -0
- package/dist/src/managers/PluginManager.js +80 -0
- package/dist/src/managers/PluginManager.js.map +1 -0
- package/dist/src/managers/SlashCommandManager.d.ts +19 -0
- package/dist/src/managers/SlashCommandManager.d.ts.map +1 -0
- package/dist/src/managers/SlashCommandManager.js +80 -0
- package/dist/src/managers/SlashCommandManager.js.map +1 -0
- package/dist/src/managers/SpecManager.d.ts +26 -0
- package/dist/src/managers/SpecManager.d.ts.map +1 -0
- package/dist/src/managers/SpecManager.js +134 -0
- package/dist/src/managers/SpecManager.js.map +1 -0
- package/dist/src/managers/ToolManager.d.ts +24 -0
- package/dist/src/managers/ToolManager.d.ts.map +1 -0
- package/dist/src/managers/ToolManager.js +97 -0
- package/dist/src/managers/ToolManager.js.map +1 -0
- package/dist/src/mcp/MCPClient.d.ts +17 -0
- package/dist/src/mcp/MCPClient.d.ts.map +1 -0
- package/dist/src/mcp/MCPClient.js +117 -0
- package/dist/src/mcp/MCPClient.js.map +1 -0
- package/dist/src/mcp/MCPManager.d.ts +12 -0
- package/dist/src/mcp/MCPManager.d.ts.map +1 -0
- package/dist/src/mcp/MCPManager.js +63 -0
- package/dist/src/mcp/MCPManager.js.map +1 -0
- package/dist/src/mcp/MCPTool.d.ts +15 -0
- package/dist/src/mcp/MCPTool.d.ts.map +1 -0
- package/dist/src/mcp/MCPTool.js +73 -0
- package/dist/src/mcp/MCPTool.js.map +1 -0
- package/dist/src/mcp/types.d.ts +42 -0
- package/dist/src/mcp/types.d.ts.map +1 -0
- package/dist/src/mcp/types.js +2 -0
- package/dist/src/mcp/types.js.map +1 -0
- package/dist/src/optimization/CompactionService.d.ts +10 -0
- package/dist/src/optimization/CompactionService.d.ts.map +1 -0
- package/dist/src/optimization/CompactionService.js +82 -0
- package/dist/src/optimization/CompactionService.js.map +1 -0
- package/dist/src/optimization/CompressionService.d.ts +18 -0
- package/dist/src/optimization/CompressionService.d.ts.map +1 -0
- package/dist/src/optimization/CompressionService.js +95 -0
- package/dist/src/optimization/CompressionService.js.map +1 -0
- package/dist/src/optimization/PerformanceMonitor.d.ts +22 -0
- package/dist/src/optimization/PerformanceMonitor.d.ts.map +1 -0
- package/dist/src/optimization/PerformanceMonitor.js +90 -0
- package/dist/src/optimization/PerformanceMonitor.js.map +1 -0
- package/dist/src/optimization/PruningService.d.ts +5 -0
- package/dist/src/optimization/PruningService.d.ts.map +1 -0
- package/dist/src/optimization/PruningService.js +59 -0
- package/dist/src/optimization/PruningService.js.map +1 -0
- package/dist/src/optimization/types.d.ts +49 -0
- package/dist/src/optimization/types.d.ts.map +1 -0
- package/dist/src/optimization/types.js +2 -0
- package/dist/src/optimization/types.js.map +1 -0
- package/dist/src/plugins/base/Plugin.d.ts +17 -0
- package/dist/src/plugins/base/Plugin.d.ts.map +1 -0
- package/dist/src/plugins/base/Plugin.js +19 -0
- package/dist/src/plugins/base/Plugin.js.map +1 -0
- package/dist/src/plugins/builtin/LoggerPlugin.d.ts +13 -0
- package/dist/src/plugins/builtin/LoggerPlugin.d.ts.map +1 -0
- package/dist/src/plugins/builtin/LoggerPlugin.js +19 -0
- package/dist/src/plugins/builtin/LoggerPlugin.js.map +1 -0
- package/dist/src/plugins/builtin/PerformancePlugin.d.ts +16 -0
- package/dist/src/plugins/builtin/PerformancePlugin.d.ts.map +1 -0
- package/dist/src/plugins/builtin/PerformancePlugin.js +50 -0
- package/dist/src/plugins/builtin/PerformancePlugin.js.map +1 -0
- package/dist/src/plugins/builtin/SecurityPlugin.d.ts +18 -0
- package/dist/src/plugins/builtin/SecurityPlugin.d.ts.map +1 -0
- package/dist/src/plugins/builtin/SecurityPlugin.js +42 -0
- package/dist/src/plugins/builtin/SecurityPlugin.js.map +1 -0
- package/dist/src/server/HTTPServer.d.ts +25 -0
- package/dist/src/server/HTTPServer.d.ts.map +1 -0
- package/dist/src/server/HTTPServer.js +231 -0
- package/dist/src/server/HTTPServer.js.map +1 -0
- package/dist/src/server/WebSocketServer.d.ts +16 -0
- package/dist/src/server/WebSocketServer.d.ts.map +1 -0
- package/dist/src/server/WebSocketServer.js +118 -0
- package/dist/src/server/WebSocketServer.js.map +1 -0
- package/dist/src/services/ConfigService.d.ts +23 -0
- package/dist/src/services/ConfigService.d.ts.map +1 -0
- package/dist/src/services/ConfigService.js +169 -0
- package/dist/src/services/ConfigService.js.map +1 -0
- package/dist/src/services/EventBus.d.ts +12 -0
- package/dist/src/services/EventBus.d.ts.map +1 -0
- package/dist/src/services/EventBus.js +63 -0
- package/dist/src/services/EventBus.js.map +1 -0
- package/dist/src/services/ModelService.d.ts +24 -0
- package/dist/src/services/ModelService.d.ts.map +1 -0
- package/dist/src/services/ModelService.js +188 -0
- package/dist/src/services/ModelService.js.map +1 -0
- package/dist/src/services/Paths.d.ts +17 -0
- package/dist/src/services/Paths.d.ts.map +1 -0
- package/dist/src/services/Paths.js +125 -0
- package/dist/src/services/Paths.js.map +1 -0
- package/dist/src/services/SessionService.d.ts +19 -0
- package/dist/src/services/SessionService.d.ts.map +1 -0
- package/dist/src/services/SessionService.js +137 -0
- package/dist/src/services/SessionService.js.map +1 -0
- package/dist/src/snapshot/FileHistory.d.ts +18 -0
- package/dist/src/snapshot/FileHistory.d.ts.map +1 -0
- package/dist/src/snapshot/FileHistory.js +118 -0
- package/dist/src/snapshot/FileHistory.js.map +1 -0
- package/dist/src/snapshot/types.d.ts +19 -0
- package/dist/src/snapshot/types.d.ts.map +1 -0
- package/dist/src/snapshot/types.js +2 -0
- package/dist/src/snapshot/types.js.map +1 -0
- package/dist/src/specs/types.d.ts +54 -0
- package/dist/src/specs/types.d.ts.map +1 -0
- package/dist/src/specs/types.js +8 -0
- package/dist/src/specs/types.js.map +1 -0
- package/dist/src/specs/utils/generator.d.ts +4 -0
- package/dist/src/specs/utils/generator.d.ts.map +1 -0
- package/dist/src/specs/utils/generator.js +106 -0
- package/dist/src/specs/utils/generator.js.map +1 -0
- package/dist/src/specs/utils/parser.d.ts +3 -0
- package/dist/src/specs/utils/parser.d.ts.map +1 -0
- package/dist/src/specs/utils/parser.js +152 -0
- package/dist/src/specs/utils/parser.js.map +1 -0
- package/dist/src/styles/base/OutputStyle.d.ts +15 -0
- package/dist/src/styles/base/OutputStyle.d.ts.map +1 -0
- package/dist/src/styles/base/OutputStyle.js +16 -0
- package/dist/src/styles/base/OutputStyle.js.map +1 -0
- package/dist/src/styles/builtin/index.d.ts +8 -0
- package/dist/src/styles/builtin/index.d.ts.map +1 -0
- package/dist/src/styles/builtin/index.js +61 -0
- package/dist/src/styles/builtin/index.js.map +1 -0
- package/dist/src/styles/managers/OutputStyleManager.d.ts +20 -0
- package/dist/src/styles/managers/OutputStyleManager.d.ts.map +1 -0
- package/dist/src/styles/managers/OutputStyleManager.js +110 -0
- package/dist/src/styles/managers/OutputStyleManager.js.map +1 -0
- package/dist/src/styles/utils/markdown.d.ts +18 -0
- package/dist/src/styles/utils/markdown.d.ts.map +1 -0
- package/dist/src/styles/utils/markdown.js +107 -0
- package/dist/src/styles/utils/markdown.js.map +1 -0
- package/dist/src/tools/base/Tool.d.ts +17 -0
- package/dist/src/tools/base/Tool.d.ts.map +1 -0
- package/dist/src/tools/base/Tool.js +31 -0
- package/dist/src/tools/base/Tool.js.map +1 -0
- package/dist/src/tools/code/EditCodeTool.d.ts +50 -0
- package/dist/src/tools/code/EditCodeTool.d.ts.map +1 -0
- package/dist/src/tools/code/EditCodeTool.js +38 -0
- package/dist/src/tools/code/EditCodeTool.js.map +1 -0
- package/dist/src/tools/file/DeleteFileTool.d.ts +18 -0
- package/dist/src/tools/file/DeleteFileTool.d.ts.map +1 -0
- package/dist/src/tools/file/DeleteFileTool.js +45 -0
- package/dist/src/tools/file/DeleteFileTool.js.map +1 -0
- package/dist/src/tools/file/EditFileTool.d.ts +24 -0
- package/dist/src/tools/file/EditFileTool.d.ts.map +1 -0
- package/dist/src/tools/file/EditFileTool.js +53 -0
- package/dist/src/tools/file/EditFileTool.js.map +1 -0
- package/dist/src/tools/file/ListFilesTool.d.ts +29 -0
- package/dist/src/tools/file/ListFilesTool.d.ts.map +1 -0
- package/dist/src/tools/file/ListFilesTool.js +34 -0
- package/dist/src/tools/file/ListFilesTool.js.map +1 -0
- package/dist/src/tools/file/ReadFileTool.d.ts +25 -0
- package/dist/src/tools/file/ReadFileTool.d.ts.map +1 -0
- package/dist/src/tools/file/ReadFileTool.js +38 -0
- package/dist/src/tools/file/ReadFileTool.js.map +1 -0
- package/dist/src/tools/file/WriteFileTool.d.ts +30 -0
- package/dist/src/tools/file/WriteFileTool.d.ts.map +1 -0
- package/dist/src/tools/file/WriteFileTool.js +39 -0
- package/dist/src/tools/file/WriteFileTool.js.map +1 -0
- package/dist/src/tools/interactive/AskUserTool.d.ts +18 -0
- package/dist/src/tools/interactive/AskUserTool.d.ts.map +1 -0
- package/dist/src/tools/interactive/AskUserTool.js +43 -0
- package/dist/src/tools/interactive/AskUserTool.js.map +1 -0
- package/dist/src/tools/interactive/ConfirmTool.d.ts +18 -0
- package/dist/src/tools/interactive/ConfirmTool.d.ts.map +1 -0
- package/dist/src/tools/interactive/ConfirmTool.js +53 -0
- package/dist/src/tools/interactive/ConfirmTool.js.map +1 -0
- package/dist/src/tools/network/FetchTool.d.ts +24 -0
- package/dist/src/tools/network/FetchTool.d.ts.map +1 -0
- package/dist/src/tools/network/FetchTool.js +56 -0
- package/dist/src/tools/network/FetchTool.js.map +1 -0
- package/dist/src/tools/network/WebSearchTool.d.ts +20 -0
- package/dist/src/tools/network/WebSearchTool.d.ts.map +1 -0
- package/dist/src/tools/network/WebSearchTool.js +69 -0
- package/dist/src/tools/network/WebSearchTool.js.map +1 -0
- package/dist/src/tools/search/GlobTool.d.ts +20 -0
- package/dist/src/tools/search/GlobTool.d.ts.map +1 -0
- package/dist/src/tools/search/GlobTool.js +62 -0
- package/dist/src/tools/search/GlobTool.js.map +1 -0
- package/dist/src/tools/search/GrepTool.d.ts +26 -0
- package/dist/src/tools/search/GrepTool.d.ts.map +1 -0
- package/dist/src/tools/search/GrepTool.js +97 -0
- package/dist/src/tools/search/GrepTool.js.map +1 -0
- package/dist/src/tools/spec/SpecReadTool.d.ts +16 -0
- package/dist/src/tools/spec/SpecReadTool.d.ts.map +1 -0
- package/dist/src/tools/spec/SpecReadTool.js +79 -0
- package/dist/src/tools/spec/SpecReadTool.js.map +1 -0
- package/dist/src/tools/spec/SpecUpdateTaskTool.d.ts +23 -0
- package/dist/src/tools/spec/SpecUpdateTaskTool.d.ts.map +1 -0
- package/dist/src/tools/spec/SpecUpdateTaskTool.js +42 -0
- package/dist/src/tools/spec/SpecUpdateTaskTool.js.map +1 -0
- package/dist/src/tools/special/ExitPlanTool.d.ts +15 -0
- package/dist/src/tools/special/ExitPlanTool.d.ts.map +1 -0
- package/dist/src/tools/special/ExitPlanTool.js +32 -0
- package/dist/src/tools/special/ExitPlanTool.js.map +1 -0
- package/dist/src/tools/special/SkillTool.d.ts +19 -0
- package/dist/src/tools/special/SkillTool.d.ts.map +1 -0
- package/dist/src/tools/special/SkillTool.js +45 -0
- package/dist/src/tools/special/SkillTool.js.map +1 -0
- package/dist/src/tools/system/BashTool.d.ts +18 -0
- package/dist/src/tools/system/BashTool.d.ts.map +1 -0
- package/dist/src/tools/system/BashTool.js +29 -0
- package/dist/src/tools/system/BashTool.js.map +1 -0
- package/dist/src/tools/system/EnvTool.d.ts +15 -0
- package/dist/src/tools/system/EnvTool.d.ts.map +1 -0
- package/dist/src/tools/system/EnvTool.js +47 -0
- package/dist/src/tools/system/EnvTool.js.map +1 -0
- package/dist/src/tools/system/ExecTool.d.ts +21 -0
- package/dist/src/tools/system/ExecTool.d.ts.map +1 -0
- package/dist/src/tools/system/ExecTool.js +41 -0
- package/dist/src/tools/system/ExecTool.js.map +1 -0
- package/dist/src/tools/task/TaskTool.d.ts +34 -0
- package/dist/src/tools/task/TaskTool.d.ts.map +1 -0
- package/dist/src/tools/task/TaskTool.js +105 -0
- package/dist/src/tools/task/TaskTool.js.map +1 -0
- package/dist/src/tools/task/TodoReadTool.d.ts +16 -0
- package/dist/src/tools/task/TodoReadTool.d.ts.map +1 -0
- package/dist/src/tools/task/TodoReadTool.js +43 -0
- package/dist/src/tools/task/TodoReadTool.js.map +1 -0
- package/dist/src/tools/task/TodoWriteTool.d.ts +25 -0
- package/dist/src/tools/task/TodoWriteTool.d.ts.map +1 -0
- package/dist/src/tools/task/TodoWriteTool.js +82 -0
- package/dist/src/tools/task/TodoWriteTool.js.map +1 -0
- package/dist/src/types/index.d.ts +175 -0
- package/dist/src/types/index.d.ts.map +1 -0
- package/dist/src/types/index.js +31 -0
- package/dist/src/types/index.js.map +1 -0
- package/dist/src/ui/App.d.ts +8 -0
- package/dist/src/ui/App.d.ts.map +1 -0
- package/dist/src/ui/App.js +100 -0
- package/dist/src/ui/App.js.map +1 -0
- package/dist/src/ui/components/MessageList.d.ts +8 -0
- package/dist/src/ui/components/MessageList.d.ts.map +1 -0
- package/dist/src/ui/components/MessageList.js +13 -0
- package/dist/src/ui/components/MessageList.js.map +1 -0
- package/dist/src/ui/components/SessionList.d.ts +10 -0
- package/dist/src/ui/components/SessionList.d.ts.map +1 -0
- package/dist/src/ui/components/SessionList.js +23 -0
- package/dist/src/ui/components/SessionList.js.map +1 -0
- package/dist/src/ui/context/AppContext.d.ts +18 -0
- package/dist/src/ui/context/AppContext.d.ts.map +1 -0
- package/dist/src/ui/context/AppContext.js +22 -0
- package/dist/src/ui/context/AppContext.js.map +1 -0
- package/dist/src/ui/hooks/useSession.d.ts +6 -0
- package/dist/src/ui/hooks/useSession.d.ts.map +1 -0
- package/dist/src/ui/hooks/useSession.js +59 -0
- package/dist/src/ui/hooks/useSession.js.map +1 -0
- package/dist/src/utils/calculator.d.ts +3 -0
- package/dist/src/utils/calculator.d.ts.map +1 -0
- package/dist/src/utils/calculator.js +13 -0
- package/dist/src/utils/calculator.js.map +1 -0
- package/dist/src/utils/firstRun.d.ts +4 -0
- package/dist/src/utils/firstRun.d.ts.map +1 -0
- package/dist/src/utils/firstRun.js +32 -0
- package/dist/src/utils/firstRun.js.map +1 -0
- package/dist/src/utils/math.d.ts +2 -0
- package/dist/src/utils/math.d.ts.map +1 -0
- package/dist/src/utils/math.js +4 -0
- package/dist/src/utils/math.js.map +1 -0
- package/dist/src/utils/setup.d.ts +2 -0
- package/dist/src/utils/setup.d.ts.map +1 -0
- package/dist/src/utils/setup.js +87 -0
- package/dist/src/utils/setup.js.map +1 -0
- package/dist/src/utils/tokenCounter.d.ts +4 -0
- package/dist/src/utils/tokenCounter.d.ts.map +1 -0
- package/dist/src/utils/tokenCounter.js +27 -0
- package/dist/src/utils/tokenCounter.js.map +1 -0
- package/dist/tests/integration/agents.test.d.ts +2 -0
- package/dist/tests/integration/agents.test.d.ts.map +1 -0
- package/dist/tests/integration/agents.test.js +34 -0
- package/dist/tests/integration/agents.test.js.map +1 -0
- package/dist/tests/integration/cli.test.d.ts +2 -0
- package/dist/tests/integration/cli.test.d.ts.map +1 -0
- package/dist/tests/integration/cli.test.js +70 -0
- package/dist/tests/integration/cli.test.js.map +1 -0
- package/dist/tests/integration/commands.test.d.ts +2 -0
- package/dist/tests/integration/commands.test.d.ts.map +1 -0
- package/dist/tests/integration/commands.test.js +35 -0
- package/dist/tests/integration/commands.test.js.map +1 -0
- package/dist/tests/integration/mcp.test.d.ts +2 -0
- package/dist/tests/integration/mcp.test.d.ts.map +1 -0
- package/dist/tests/integration/mcp.test.js +44 -0
- package/dist/tests/integration/mcp.test.js.map +1 -0
- package/dist/tests/integration/output-styles.test.d.ts +2 -0
- package/dist/tests/integration/output-styles.test.d.ts.map +1 -0
- package/dist/tests/integration/output-styles.test.js +88 -0
- package/dist/tests/integration/output-styles.test.js.map +1 -0
- package/dist/tests/integration/plugins.test.d.ts +2 -0
- package/dist/tests/integration/plugins.test.d.ts.map +1 -0
- package/dist/tests/integration/plugins.test.js +42 -0
- package/dist/tests/integration/plugins.test.js.map +1 -0
- package/dist/tests/integration/specs.test.d.ts +2 -0
- package/dist/tests/integration/specs.test.d.ts.map +1 -0
- package/dist/tests/integration/specs.test.js +102 -0
- package/dist/tests/integration/specs.test.js.map +1 -0
- package/dist/tests/integration/ui.test.d.ts +2 -0
- package/dist/tests/integration/ui.test.d.ts.map +1 -0
- package/dist/tests/integration/ui.test.js +71 -0
- package/dist/tests/integration/ui.test.js.map +1 -0
- package/dist/tests/mocks/mock-mcp-server.d.ts +3 -0
- package/dist/tests/mocks/mock-mcp-server.d.ts.map +1 -0
- package/dist/tests/mocks/mock-mcp-server.js +127 -0
- package/dist/tests/mocks/mock-mcp-server.js.map +1 -0
- package/dist/tests/unit/application/Application.test.d.ts +2 -0
- package/dist/tests/unit/application/Application.test.d.ts.map +1 -0
- package/dist/tests/unit/application/Application.test.js +21 -0
- package/dist/tests/unit/application/Application.test.js.map +1 -0
- package/dist/tests/unit/application/Container.test.d.ts +2 -0
- package/dist/tests/unit/application/Container.test.d.ts.map +1 -0
- package/dist/tests/unit/application/Container.test.js +38 -0
- package/dist/tests/unit/application/Container.test.js.map +1 -0
- package/dist/tests/unit/code/CodeEditor.test.d.ts +2 -0
- package/dist/tests/unit/code/CodeEditor.test.d.ts.map +1 -0
- package/dist/tests/unit/code/CodeEditor.test.js +56 -0
- package/dist/tests/unit/code/CodeEditor.test.js.map +1 -0
- package/dist/tests/unit/code/CodeLocator.test.d.ts +2 -0
- package/dist/tests/unit/code/CodeLocator.test.d.ts.map +1 -0
- package/dist/tests/unit/code/CodeLocator.test.js +50 -0
- package/dist/tests/unit/code/CodeLocator.test.js.map +1 -0
- package/dist/tests/unit/code/CodeParser.test.d.ts +2 -0
- package/dist/tests/unit/code/CodeParser.test.d.ts.map +1 -0
- package/dist/tests/unit/code/CodeParser.test.js +27 -0
- package/dist/tests/unit/code/CodeParser.test.js.map +1 -0
- package/dist/tests/unit/managers/AgentManager.test.d.ts +2 -0
- package/dist/tests/unit/managers/AgentManager.test.d.ts.map +1 -0
- package/dist/tests/unit/managers/AgentManager.test.js +68 -0
- package/dist/tests/unit/managers/AgentManager.test.js.map +1 -0
- package/dist/tests/unit/managers/PluginManager.test.d.ts +2 -0
- package/dist/tests/unit/managers/PluginManager.test.d.ts.map +1 -0
- package/dist/tests/unit/managers/PluginManager.test.js +76 -0
- package/dist/tests/unit/managers/PluginManager.test.js.map +1 -0
- package/dist/tests/unit/managers/SlashCommandManager.test.d.ts +2 -0
- package/dist/tests/unit/managers/SlashCommandManager.test.d.ts.map +1 -0
- package/dist/tests/unit/managers/SlashCommandManager.test.js +47 -0
- package/dist/tests/unit/managers/SlashCommandManager.test.js.map +1 -0
- package/dist/tests/unit/managers/SpecManager.test.d.ts +2 -0
- package/dist/tests/unit/managers/SpecManager.test.d.ts.map +1 -0
- package/dist/tests/unit/managers/SpecManager.test.js +97 -0
- package/dist/tests/unit/managers/SpecManager.test.js.map +1 -0
- package/dist/tests/unit/managers/ToolManager.test.d.ts +2 -0
- package/dist/tests/unit/managers/ToolManager.test.d.ts.map +1 -0
- package/dist/tests/unit/managers/ToolManager.test.js +69 -0
- package/dist/tests/unit/managers/ToolManager.test.js.map +1 -0
- package/dist/tests/unit/mcp/MCPClient.test.d.ts +2 -0
- package/dist/tests/unit/mcp/MCPClient.test.d.ts.map +1 -0
- package/dist/tests/unit/mcp/MCPClient.test.js +40 -0
- package/dist/tests/unit/mcp/MCPClient.test.js.map +1 -0
- package/dist/tests/unit/services/ConfigService.test.d.ts +2 -0
- package/dist/tests/unit/services/ConfigService.test.d.ts.map +1 -0
- package/dist/tests/unit/services/ConfigService.test.js +104 -0
- package/dist/tests/unit/services/ConfigService.test.js.map +1 -0
- package/dist/tests/unit/services/EventBus.test.d.ts +2 -0
- package/dist/tests/unit/services/EventBus.test.d.ts.map +1 -0
- package/dist/tests/unit/services/EventBus.test.js +117 -0
- package/dist/tests/unit/services/EventBus.test.js.map +1 -0
- package/dist/tests/unit/services/ModelService.test.d.ts +2 -0
- package/dist/tests/unit/services/ModelService.test.d.ts.map +1 -0
- package/dist/tests/unit/services/ModelService.test.js +63 -0
- package/dist/tests/unit/services/ModelService.test.js.map +1 -0
- package/dist/tests/unit/services/Paths.test.d.ts +2 -0
- package/dist/tests/unit/services/Paths.test.d.ts.map +1 -0
- package/dist/tests/unit/services/Paths.test.js +33 -0
- package/dist/tests/unit/services/Paths.test.js.map +1 -0
- package/dist/tests/unit/services/SessionService.test.d.ts +2 -0
- package/dist/tests/unit/services/SessionService.test.d.ts.map +1 -0
- package/dist/tests/unit/services/SessionService.test.js +80 -0
- package/dist/tests/unit/services/SessionService.test.js.map +1 -0
- package/dist/tests/unit/snapshot/FileHistory.test.d.ts +2 -0
- package/dist/tests/unit/snapshot/FileHistory.test.d.ts.map +1 -0
- package/dist/tests/unit/snapshot/FileHistory.test.js +101 -0
- package/dist/tests/unit/snapshot/FileHistory.test.js.map +1 -0
- package/dist/tests/unit/specs/generator.test.d.ts +2 -0
- package/dist/tests/unit/specs/generator.test.d.ts.map +1 -0
- package/dist/tests/unit/specs/generator.test.js +70 -0
- package/dist/tests/unit/specs/generator.test.js.map +1 -0
- package/dist/tests/unit/specs/parser.test.d.ts +2 -0
- package/dist/tests/unit/specs/parser.test.d.ts.map +1 -0
- package/dist/tests/unit/specs/parser.test.js +85 -0
- package/dist/tests/unit/specs/parser.test.js.map +1 -0
- package/dist/tests/unit/styles/OutputStyle.test.d.ts +2 -0
- package/dist/tests/unit/styles/OutputStyle.test.d.ts.map +1 -0
- package/dist/tests/unit/styles/OutputStyle.test.js +33 -0
- package/dist/tests/unit/styles/OutputStyle.test.js.map +1 -0
- package/dist/tests/unit/styles/OutputStyleManager.test.d.ts +2 -0
- package/dist/tests/unit/styles/OutputStyleManager.test.d.ts.map +1 -0
- package/dist/tests/unit/styles/OutputStyleManager.test.js +75 -0
- package/dist/tests/unit/styles/OutputStyleManager.test.js.map +1 -0
- package/dist/tests/unit/tools/BashTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/BashTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/BashTool.test.js +35 -0
- package/dist/tests/unit/tools/BashTool.test.js.map +1 -0
- package/dist/tests/unit/tools/EditFileTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/EditFileTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/EditFileTool.test.js +48 -0
- package/dist/tests/unit/tools/EditFileTool.test.js.map +1 -0
- package/dist/tests/unit/tools/GrepTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/GrepTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/GrepTool.test.js +46 -0
- package/dist/tests/unit/tools/GrepTool.test.js.map +1 -0
- package/dist/tests/unit/tools/ListFilesTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/ListFilesTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/ListFilesTool.test.js +58 -0
- package/dist/tests/unit/tools/ListFilesTool.test.js.map +1 -0
- package/dist/tests/unit/tools/ReadFileTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/ReadFileTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/ReadFileTool.test.js +42 -0
- package/dist/tests/unit/tools/ReadFileTool.test.js.map +1 -0
- package/dist/tests/unit/tools/TodoWriteTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/TodoWriteTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/TodoWriteTool.test.js +54 -0
- package/dist/tests/unit/tools/TodoWriteTool.test.js.map +1 -0
- package/dist/tests/unit/tools/WriteFileTool.test.d.ts +2 -0
- package/dist/tests/unit/tools/WriteFileTool.test.d.ts.map +1 -0
- package/dist/tests/unit/tools/WriteFileTool.test.js +69 -0
- package/dist/tests/unit/tools/WriteFileTool.test.js.map +1 -0
- package/dist/tests/unit/ui/App.test.d.ts +2 -0
- package/dist/tests/unit/ui/App.test.d.ts.map +1 -0
- package/dist/tests/unit/ui/App.test.js +46 -0
- package/dist/tests/unit/ui/App.test.js.map +1 -0
- package/dist/tests/unit/ui/AppContext.test.d.ts +2 -0
- package/dist/tests/unit/ui/AppContext.test.d.ts.map +1 -0
- package/dist/tests/unit/ui/AppContext.test.js +39 -0
- package/dist/tests/unit/ui/AppContext.test.js.map +1 -0
- package/dist/tests/unit/ui/MessageList.test.d.ts +2 -0
- package/dist/tests/unit/ui/MessageList.test.d.ts.map +1 -0
- package/dist/tests/unit/ui/MessageList.test.js +23 -0
- package/dist/tests/unit/ui/MessageList.test.js.map +1 -0
- package/dist/tests/unit/ui/SessionList.test.d.ts +2 -0
- package/dist/tests/unit/ui/SessionList.test.d.ts.map +1 -0
- package/dist/tests/unit/ui/SessionList.test.js +49 -0
- package/dist/tests/unit/ui/SessionList.test.js.map +1 -0
- package/package.json +84 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { parse } from '@babel/parser';
|
|
2
|
+
export class CodeParser {
|
|
3
|
+
parse(code, filePath) {
|
|
4
|
+
const isTypeScript = filePath.endsWith('.ts') || filePath.endsWith('.tsx') || filePath.endsWith('.mts');
|
|
5
|
+
try {
|
|
6
|
+
return parse(code, {
|
|
7
|
+
sourceType: 'module',
|
|
8
|
+
plugins: [
|
|
9
|
+
...(isTypeScript ? ['typescript'] : []),
|
|
10
|
+
'jsx',
|
|
11
|
+
'decorators-legacy',
|
|
12
|
+
'classProperties',
|
|
13
|
+
'optionalChaining',
|
|
14
|
+
'nullishCoalescingOperator',
|
|
15
|
+
],
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
throw new Error(`Failed to parse code: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
validate(code, filePath) {
|
|
23
|
+
try {
|
|
24
|
+
this.parse(code, filePath);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
catch (error) {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=CodeParser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CodeParser.js","sourceRoot":"","sources":["../../../src/code/CodeParser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAWtC,MAAM,OAAO,UAAU;IAQrB,KAAK,CAAC,IAAY,EAAE,QAAgB;QAClC,MAAM,YAAY,GAChB,QAAQ,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAErF,IAAI,CAAC;YACH,OAAO,KAAK,CAAC,IAAI,EAAE;gBACjB,UAAU,EAAE,QAAQ;gBACpB,OAAO,EAAE;oBAEP,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,YAAqB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;oBAEhD,KAAK;oBAEL,mBAAmB;oBAEnB,iBAAiB;oBAEjB,kBAAkB;oBAElB,2BAA2B;iBAC5B;aACF,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,KAAK,CACb,yBAAyB,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CACpF,CAAC;QACJ,CAAC;IACH,CAAC;IASD,QAAQ,CAAC,IAAY,EAAE,QAAgB;QACrC,IAAI,CAAC;YACH,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;YAC3B,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export type CodeElementType = 'function' | 'class' | 'method' | 'variable' | 'import' | 'export';
|
|
2
|
+
export interface CodeLocation {
|
|
3
|
+
start: number;
|
|
4
|
+
end: number;
|
|
5
|
+
line: number;
|
|
6
|
+
column: number;
|
|
7
|
+
}
|
|
8
|
+
export interface CodeElement {
|
|
9
|
+
type: CodeElementType;
|
|
10
|
+
name: string;
|
|
11
|
+
location: CodeLocation;
|
|
12
|
+
code: string;
|
|
13
|
+
parent?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface EditResult {
|
|
16
|
+
success: boolean;
|
|
17
|
+
message: string;
|
|
18
|
+
oldCode?: string;
|
|
19
|
+
newCode?: string;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/code/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,eAAe,GACvB,UAAU,GACV,OAAO,GACP,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,QAAQ,CAAC;AAKb,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAKD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,eAAe,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,YAAY,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAKD,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/code/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Application } from '../../application/Application';
|
|
2
|
+
export declare abstract class SlashCommand {
|
|
3
|
+
abstract name: string;
|
|
4
|
+
abstract description: string;
|
|
5
|
+
aliases: string[];
|
|
6
|
+
abstract execute(args: string[], app: Application): Promise<void>;
|
|
7
|
+
validate(_args: string[]): boolean;
|
|
8
|
+
getInfo(): {
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
aliases: string[];
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=SlashCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/base/SlashCommand.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAYjE,8BAAsB,YAAY;IAMhC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAOtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAO7B,OAAO,EAAE,MAAM,EAAE,CAAM;IASvB,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAQjE,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO;IASlC,OAAO,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE;CAOpE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SlashCommand.js","sourceRoot":"","sources":["../../../../src/commands/base/SlashCommand.ts"],"names":[],"mappings":"AAYA,MAAM,OAAgB,YAAY;IAoBhC,OAAO,GAAa,EAAE,CAAC;IAiBvB,QAAQ,CAAC,KAAe;QACtB,OAAO,IAAI,CAAC;IACd,CAAC;IAOD,OAAO;QACL,OAAO;YACL,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,OAAO,EAAE,IAAI,CAAC,OAAO;SACtB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class ModelCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
validate(args: string[]): boolean;
|
|
8
|
+
execute(args: string[], _app: Application): Promise<void>;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=ModelCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/model/ModelCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AASjE,qBAAa,YAAa,SAAQ,YAAY;IAC5C,IAAI,SAAW;IACf,WAAW,SAAqB;IAChC,OAAO,WAAS;IAEhB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO;IAQ3B,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAShE"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class ModelCommand extends SlashCommand {
|
|
3
|
+
name = 'model';
|
|
4
|
+
description = 'Switch AI model';
|
|
5
|
+
aliases = ['m'];
|
|
6
|
+
validate(args) {
|
|
7
|
+
if (args.length === 0) {
|
|
8
|
+
console.log('❌ Usage: /model <model-name>');
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
async execute(args, _app) {
|
|
14
|
+
const newModel = args[0];
|
|
15
|
+
console.log(`💡 Model switching to: ${newModel}`);
|
|
16
|
+
console.log('⚠️ Note: Full model switching requires Application.switchModel() implementation');
|
|
17
|
+
console.log(' This will be implemented in a future chapter');
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=ModelCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModelCommand.js","sourceRoot":"","sources":["../../../../src/commands/model/ModelCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUpD,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,IAAI,GAAG,OAAO,CAAC;IACf,WAAW,GAAG,iBAAiB,CAAC;IAChC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhB,QAAQ,CAAC,IAAc;QACrB,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAC5C,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,IAAc,EAAE,IAAiB;QAC7C,MAAM,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAIzB,OAAO,CAAC,GAAG,CAAC,0BAA0B,QAAQ,EAAE,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,kFAAkF,CAAC,CAAC;QAChG,OAAO,CAAC,GAAG,CAAC,iDAAiD,CAAC,CAAC;IACjE,CAAC;CACF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Container } from '../../application/Container';
|
|
3
|
+
import type { Application } from '../../application/Application';
|
|
4
|
+
export declare class PerformanceCommand extends SlashCommand {
|
|
5
|
+
private container;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
aliases: string[];
|
|
9
|
+
constructor(container: Container);
|
|
10
|
+
execute(_args: string[], _app: Application): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=PerformanceCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PerformanceCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/performance/PerformanceCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQjE,qBAAa,kBAAmB,SAAQ,YAAY;IAKtC,OAAO,CAAC,SAAS;IAJ7B,IAAI,SAAiB;IACrB,WAAW,SAAc;IACzB,OAAO,WAAY;gBAEC,SAAS,EAAE,SAAS;IAIlC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBjE"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class PerformanceCommand extends SlashCommand {
|
|
3
|
+
container;
|
|
4
|
+
name = 'performance';
|
|
5
|
+
description = '显示性能统计信息';
|
|
6
|
+
aliases = ['perf'];
|
|
7
|
+
constructor(container) {
|
|
8
|
+
super();
|
|
9
|
+
this.container = container;
|
|
10
|
+
}
|
|
11
|
+
async execute(_args, _app) {
|
|
12
|
+
const modelService = this.container.get('ModelService');
|
|
13
|
+
const performanceMonitor = modelService.performanceMonitor;
|
|
14
|
+
if (!performanceMonitor) {
|
|
15
|
+
console.log('⚠️ 性能监控未启用');
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const report = performanceMonitor.generateReport();
|
|
19
|
+
console.log(report);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=PerformanceCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PerformanceCommand.js","sourceRoot":"","sources":["../../../../src/commands/performance/PerformanceCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUpD,MAAM,OAAO,kBAAmB,SAAQ,YAAY;IAK9B;IAJpB,IAAI,GAAG,aAAa,CAAC;IACrB,WAAW,GAAG,UAAU,CAAC;IACzB,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;IAEnB,YAAoB,SAAoB;QACtC,KAAK,EAAE,CAAC;QADU,cAAS,GAAT,SAAS,CAAW;IAExC,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,IAAiB;QAC9C,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAe,cAAc,CAAC,CAAC;QAItE,MAAM,kBAAkB,GAAI,YAAoB,CAAC,kBAAkB,CAAC;QAEpE,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACxB,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;YAC3B,OAAO;QACT,CAAC;QAGD,MAAM,MAAM,GAAG,kBAAkB,CAAC,cAAc,EAAE,CAAC;QAEnD,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACtB,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class ClearCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
execute(_args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ClearCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/session/ClearCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AASjE,qBAAa,YAAa,SAAQ,YAAY;IAC5C,IAAI,SAAW;IACf,WAAW,SAAgC;IAC3C,OAAO,WAAS;IAEV,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAiBhE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class ClearCommand extends SlashCommand {
|
|
3
|
+
name = 'clear';
|
|
4
|
+
description = 'Clear current conversation';
|
|
5
|
+
aliases = ['c'];
|
|
6
|
+
async execute(_args, app) {
|
|
7
|
+
const sessionService = app.getContainer().get('session');
|
|
8
|
+
const currentSession = sessionService.getCurrent();
|
|
9
|
+
if (!currentSession) {
|
|
10
|
+
console.log('❌ No active session');
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const summary = currentSession.config?.summary;
|
|
14
|
+
await sessionService.create(summary);
|
|
15
|
+
console.log('✅ Conversation cleared');
|
|
16
|
+
console.log(' New session created');
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=ClearCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ClearCommand.js","sourceRoot":"","sources":["../../../../src/commands/session/ClearCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUpD,MAAM,OAAO,YAAa,SAAQ,YAAY;IAC5C,IAAI,GAAG,OAAO,CAAC;IACf,WAAW,GAAG,4BAA4B,CAAC;IAC3C,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;IAEhB,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,GAAgB;QAC7C,MAAM,cAAc,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,GAAG,CAAiB,SAAS,CAAC,CAAC;QAGzE,MAAM,cAAc,GAAG,cAAc,CAAC,UAAU,EAAE,CAAC;QACnD,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;YACnC,OAAO;QACT,CAAC;QAGD,MAAM,OAAO,GAAG,cAAc,CAAC,MAAM,EAAE,OAAO,CAAC;QAC/C,MAAM,cAAc,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QAErC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;QACtC,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class ExitCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
execute(_args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=ExitCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExitCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/session/ExitCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQjE,qBAAa,WAAY,SAAQ,YAAY;IAC3C,IAAI,SAAU;IACd,WAAW,SAAsB;IACjC,OAAO,WAAiB;IAElB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAShE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class ExitCommand extends SlashCommand {
|
|
3
|
+
name = 'exit';
|
|
4
|
+
description = 'Exit the program';
|
|
5
|
+
aliases = ['quit', 'q'];
|
|
6
|
+
async execute(_args, app) {
|
|
7
|
+
console.log('👋 Goodbye!');
|
|
8
|
+
await app.stop();
|
|
9
|
+
process.exit(0);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ExitCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExitCommand.js","sourceRoot":"","sources":["../../../../src/commands/session/ExitCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AASpD,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,IAAI,GAAG,MAAM,CAAC;IACd,WAAW,GAAG,kBAAkB,CAAC;IACjC,OAAO,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAExB,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,GAAgB;QAC7C,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;QAG3B,MAAM,GAAG,CAAC,IAAI,EAAE,CAAC;QAGjB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class HelpCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
execute(args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=HelpCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/session/HelpCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAUjE,qBAAa,WAAY,SAAQ,YAAY;IAC3C,IAAI,SAAU;IACd,WAAW,SAA2B;IACtC,OAAO,WAAc;IAEf,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAgD/D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class HelpCommand extends SlashCommand {
|
|
3
|
+
name = 'help';
|
|
4
|
+
description = 'Show help information';
|
|
5
|
+
aliases = ['h', '?'];
|
|
6
|
+
async execute(args, app) {
|
|
7
|
+
const commandManager = app.getContainer().get('command');
|
|
8
|
+
if (args.length > 0) {
|
|
9
|
+
const commandName = args[0];
|
|
10
|
+
const command = commandManager.get(commandName);
|
|
11
|
+
if (!command) {
|
|
12
|
+
console.log(`❌ Unknown command: /${commandName}`);
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
console.log(`\n📖 Help for /${command.name}:`);
|
|
16
|
+
console.log(` ${command.description}`);
|
|
17
|
+
if (command.aliases.length > 0) {
|
|
18
|
+
console.log(` Aliases: ${command.aliases.map((a) => `/${a}`).join(', ')}`);
|
|
19
|
+
}
|
|
20
|
+
console.log('');
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
const commands = commandManager.getAllInfo();
|
|
24
|
+
console.log('\n📚 Available Commands:\n');
|
|
25
|
+
const categories = {
|
|
26
|
+
'Session Management': ['help', 'clear', 'exit', 'resume', 'sessions'],
|
|
27
|
+
'Model Management': ['model', 'models'],
|
|
28
|
+
'Context Management': ['context', 'add-dir'],
|
|
29
|
+
};
|
|
30
|
+
for (const [category, names] of Object.entries(categories)) {
|
|
31
|
+
console.log(`${category}:`);
|
|
32
|
+
for (const name of names) {
|
|
33
|
+
const cmd = commands.find((c) => c.name === name);
|
|
34
|
+
if (cmd) {
|
|
35
|
+
const aliases = cmd.aliases.length > 0 ? ` (${cmd.aliases.join(', ')})` : '';
|
|
36
|
+
console.log(` /${cmd.name}${aliases} - ${cmd.description}`);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
console.log('');
|
|
40
|
+
}
|
|
41
|
+
console.log('💡 Type /help <command> for more information\n');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=HelpCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpCommand.js","sourceRoot":"","sources":["../../../../src/commands/session/HelpCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAWpD,MAAM,OAAO,WAAY,SAAQ,YAAY;IAC3C,IAAI,GAAG,MAAM,CAAC;IACd,WAAW,GAAG,uBAAuB,CAAC;IACtC,OAAO,GAAG,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAErB,KAAK,CAAC,OAAO,CAAC,IAAc,EAAE,GAAgB;QAC5C,MAAM,cAAc,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,GAAG,CAAsB,SAAS,CAAC,CAAC;QAG9E,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YAC5B,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YAEhD,IAAI,CAAC,OAAO,EAAE,CAAC;gBACb,OAAO,CAAC,GAAG,CAAC,uBAAuB,WAAW,EAAE,CAAC,CAAC;gBAClD,OAAO;YACT,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,kBAAkB,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC;YAC/C,OAAO,CAAC,GAAG,CAAC,MAAM,OAAO,CAAC,WAAW,EAAE,CAAC,CAAC;YACzC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAChB,OAAO;QACT,CAAC;QAGD,MAAM,QAAQ,GAAG,cAAc,CAAC,UAAU,EAAE,CAAC;QAE7C,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;QAG1C,MAAM,UAAU,GAAG;YACjB,oBAAoB,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,CAAC;YACrE,kBAAkB,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;YACvC,oBAAoB,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;SAC7C,CAAC;QAEF,KAAK,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;YAC3D,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,CAAC,CAAC;YAC5B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;gBAClD,IAAI,GAAG,EAAE,CAAC;oBACR,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;oBAC7E,OAAO,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,IAAI,GAAG,OAAO,MAAM,GAAG,CAAC,WAAW,EAAE,CAAC,CAAC;gBAC/D,CAAC;YACH,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,gDAAgD,CAAC,CAAC;IAChE,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class SessionsCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
execute(_args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=SessionsCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionsCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/session/SessionsCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AASjE,qBAAa,eAAgB,SAAQ,YAAY;IAC/C,IAAI,SAAc;IAClB,WAAW,SAAuB;IAClC,OAAO,WAAU;IAEX,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAyBhE"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class SessionsCommand extends SlashCommand {
|
|
3
|
+
name = 'sessions';
|
|
4
|
+
description = 'List all sessions';
|
|
5
|
+
aliases = ['ls'];
|
|
6
|
+
async execute(_args, app) {
|
|
7
|
+
const sessionService = app.getContainer().get('session');
|
|
8
|
+
const sessions = sessionService.list();
|
|
9
|
+
if (sessions.length === 0) {
|
|
10
|
+
console.log('📭 No sessions found');
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
console.log(`\n📚 Sessions (${sessions.length}):\n`);
|
|
14
|
+
const currentSession = sessionService.getCurrent();
|
|
15
|
+
for (const session of sessions) {
|
|
16
|
+
const isCurrent = currentSession && session.sessionId === currentSession.id;
|
|
17
|
+
const marker = isCurrent ? '👉 ' : ' ';
|
|
18
|
+
console.log(`${marker}${session.sessionId}`);
|
|
19
|
+
console.log(` Summary: ${session.summary || 'No summary'}`);
|
|
20
|
+
console.log(` Messages: ${session.messageCount}`);
|
|
21
|
+
console.log(` Created: ${new Date(session.created).toLocaleString()}`);
|
|
22
|
+
console.log('');
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=SessionsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SessionsCommand.js","sourceRoot":"","sources":["../../../../src/commands/session/SessionsCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAUpD,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAC/C,IAAI,GAAG,UAAU,CAAC;IAClB,WAAW,GAAG,mBAAmB,CAAC;IAClC,OAAO,GAAG,CAAC,IAAI,CAAC,CAAC;IAEjB,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,GAAgB;QAC7C,MAAM,cAAc,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,GAAG,CAAiB,SAAS,CAAC,CAAC;QAGzE,MAAM,QAAQ,GAAG,cAAc,CAAC,IAAI,EAAE,CAAC;QAEvC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAC,CAAC;YACpC,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,kBAAkB,QAAQ,CAAC,MAAM,MAAM,CAAC,CAAC;QAErD,MAAM,cAAc,GAAG,cAAc,CAAC,UAAU,EAAE,CAAC;QAEnD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,SAAS,GAAG,cAAc,IAAI,OAAO,CAAC,SAAS,KAAK,cAAc,CAAC,EAAE,CAAC;YAC5E,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,eAAe,OAAO,CAAC,OAAO,IAAI,YAAY,EAAE,CAAC,CAAC;YAC9D,OAAO,CAAC,GAAG,CAAC,gBAAgB,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;YACpD,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YACzE,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class RewindCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
execute(args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=RewindCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewindCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/snapshot/RewindCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAWjE,qBAAa,aAAc,SAAQ,YAAY;IAC7C,IAAI,SAAY;IAChB,WAAW,SAAgB;IAC3B,OAAO,WAAY;IAEb,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAmD/D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class RewindCommand extends SlashCommand {
|
|
3
|
+
name = 'rewind';
|
|
4
|
+
description = '回退到之前的文件版本';
|
|
5
|
+
aliases = ['undo'];
|
|
6
|
+
async execute(args, app) {
|
|
7
|
+
const fileHistory = app.getContainer().getFileHistory();
|
|
8
|
+
const snapshots = fileHistory.listSnapshots();
|
|
9
|
+
if (snapshots.length === 0) {
|
|
10
|
+
console.log('❌ 没有可用的快照');
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const isPreview = args.includes('--preview');
|
|
14
|
+
const snapshotId = args.find((arg) => !arg.startsWith('--'));
|
|
15
|
+
const targetSnapshot = snapshotId ? snapshots.find((s) => s.id === snapshotId) : snapshots[0];
|
|
16
|
+
if (!targetSnapshot) {
|
|
17
|
+
console.log(`❌ 找不到快照: ${snapshotId}`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (isPreview) {
|
|
21
|
+
console.log(`\n🔍 预览回退到: ${targetSnapshot.id}`);
|
|
22
|
+
console.log(`📅 时间: ${targetSnapshot.timestamp.toLocaleString()}`);
|
|
23
|
+
const diffs = await fileHistory.previewRewind(targetSnapshot.id);
|
|
24
|
+
if (diffs.length === 0) {
|
|
25
|
+
console.log('\n✅ 没有变化');
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
console.log(`\n📝 将会恢复 ${diffs.length} 个文件:\n`);
|
|
29
|
+
for (const diff of diffs) {
|
|
30
|
+
console.log(`📄 ${diff.path}`);
|
|
31
|
+
console.log(diff.changes);
|
|
32
|
+
console.log('');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
else {
|
|
36
|
+
console.log(`\n⏪ 回退到: ${targetSnapshot.id}`);
|
|
37
|
+
console.log(`📅 时间: ${targetSnapshot.timestamp.toLocaleString()}`);
|
|
38
|
+
await fileHistory.rewindTo(targetSnapshot.id);
|
|
39
|
+
console.log('\n✅ 回退完成!');
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=RewindCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RewindCommand.js","sourceRoot":"","sources":["../../../../src/commands/snapshot/RewindCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAYpD,MAAM,OAAO,aAAc,SAAQ,YAAY;IAC7C,IAAI,GAAG,QAAQ,CAAC;IAChB,WAAW,GAAG,YAAY,CAAC;IAC3B,OAAO,GAAG,CAAC,MAAM,CAAC,CAAC;IAEnB,KAAK,CAAC,OAAO,CAAC,IAAc,EAAE,GAAgB;QAC5C,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC;QACxD,MAAM,SAAS,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC;QAG9C,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;YACzB,OAAO;QACT,CAAC;QAGD,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;QAC7C,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;QAG7D,MAAM,cAAc,GAAG,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;QAE9F,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,YAAY,UAAU,EAAE,CAAC,CAAC;YACtC,OAAO;QACT,CAAC;QAED,IAAI,SAAS,EAAE,CAAC;YAEd,OAAO,CAAC,GAAG,CAAC,eAAe,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;YAChD,OAAO,CAAC,GAAG,CAAC,UAAU,cAAc,CAAC,SAAS,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAEnE,MAAM,KAAK,GAAG,MAAM,WAAW,CAAC,aAAa,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAEjE,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;gBACvB,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;gBACxB,OAAO;YACT,CAAC;YAED,OAAO,CAAC,GAAG,CAAC,aAAa,KAAK,CAAC,MAAM,SAAS,CAAC,CAAC;YAEhD,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,OAAO,CAAC,GAAG,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;gBAC/B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;gBAC1B,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YAClB,CAAC;QACH,CAAC;aAAM,CAAC;YAEN,OAAO,CAAC,GAAG,CAAC,YAAY,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC;YAC7C,OAAO,CAAC,GAAG,CAAC,UAAU,cAAc,CAAC,SAAS,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAEnE,MAAM,WAAW,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;YAE9C,OAAO,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class SnapshotsCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
aliases: string[];
|
|
7
|
+
execute(_args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=SnapshotsCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnapshotsCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/snapshot/SnapshotsCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAQjE,qBAAa,gBAAiB,SAAQ,YAAY;IAChD,IAAI,SAAe;IACnB,WAAW,SAAc;IACzB,OAAO,WAAe;IAEhB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAqBhE"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class SnapshotsCommand extends SlashCommand {
|
|
3
|
+
name = 'snapshots';
|
|
4
|
+
description = '列出所有文件快照';
|
|
5
|
+
aliases = ['history'];
|
|
6
|
+
async execute(_args, app) {
|
|
7
|
+
const fileHistory = app.getContainer().getFileHistory();
|
|
8
|
+
const snapshots = fileHistory.listSnapshots();
|
|
9
|
+
if (snapshots.length === 0) {
|
|
10
|
+
console.log('📸 还没有创建任何快照');
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
console.log(`\n📸 文件快照列表 (共 ${snapshots.length} 个):\n`);
|
|
14
|
+
for (const snapshot of snapshots) {
|
|
15
|
+
console.log(`ID: ${snapshot.id}`);
|
|
16
|
+
console.log(`时间: ${snapshot.timestamp.toLocaleString()}`);
|
|
17
|
+
console.log(`文件: ${snapshot.files.length} 个`);
|
|
18
|
+
if (snapshot.description) {
|
|
19
|
+
console.log(`描述: ${snapshot.description}`);
|
|
20
|
+
}
|
|
21
|
+
console.log('');
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=SnapshotsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SnapshotsCommand.js","sourceRoot":"","sources":["../../../../src/commands/snapshot/SnapshotsCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AASpD,MAAM,OAAO,gBAAiB,SAAQ,YAAY;IAChD,IAAI,GAAG,WAAW,CAAC;IACnB,WAAW,GAAG,UAAU,CAAC;IACzB,OAAO,GAAG,CAAC,SAAS,CAAC,CAAC;IAEtB,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,GAAgB;QAC7C,MAAM,WAAW,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,cAAc,EAAE,CAAC;QACxD,MAAM,SAAS,GAAG,WAAW,CAAC,aAAa,EAAE,CAAC;QAE9C,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;YAC5B,OAAO;QACT,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,kBAAkB,SAAS,CAAC,MAAM,QAAQ,CAAC,CAAC;QAExD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;YACjC,OAAO,CAAC,GAAG,CAAC,OAAO,QAAQ,CAAC,EAAE,EAAE,CAAC,CAAC;YAClC,OAAO,CAAC,GAAG,CAAC,OAAO,QAAQ,CAAC,SAAS,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;YAC1D,OAAO,CAAC,GAAG,CAAC,OAAO,QAAQ,CAAC,KAAK,CAAC,MAAM,IAAI,CAAC,CAAC;YAC9C,IAAI,QAAQ,CAAC,WAAW,EAAE,CAAC;gBACzB,OAAO,CAAC,GAAG,CAAC,OAAO,QAAQ,CAAC,WAAW,EAAE,CAAC,CAAC;YAC7C,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class SpecCreateCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
usage: string;
|
|
7
|
+
execute(args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=SpecCreateCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecCreateCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/spec/SpecCreateCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAYhE,qBAAa,iBAAkB,SAAQ,YAAY;IAClD,IAAI,SAAiB;IACrB,WAAW,SAAuB;IAClC,KAAK,SAAwC;IAEvC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAiB/D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class SpecCreateCommand extends SlashCommand {
|
|
3
|
+
name = 'spec:create';
|
|
4
|
+
description = 'Create a new spec';
|
|
5
|
+
usage = '/spec:create <title> [description]';
|
|
6
|
+
async execute(args, app) {
|
|
7
|
+
if (args.length === 0) {
|
|
8
|
+
console.log('❌ Error: Title is required');
|
|
9
|
+
console.log(`Usage: ${this.usage}`);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const title = args[0];
|
|
13
|
+
const description = args.slice(1).join(' ') || undefined;
|
|
14
|
+
try {
|
|
15
|
+
await app.createSpec(title, description);
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.log(`❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=SpecCreateCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecCreateCommand.js","sourceRoot":"","sources":["../../../../src/commands/spec/SpecCreateCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAanD,MAAM,OAAO,iBAAkB,SAAQ,YAAY;IAClD,IAAI,GAAG,aAAa,CAAC;IACrB,WAAW,GAAG,mBAAmB,CAAC;IAClC,KAAK,GAAG,oCAAoC,CAAC;IAE7C,KAAK,CAAC,OAAO,CAAC,IAAc,EAAE,GAAgB;QAC5C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;YAC1C,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YACpC,OAAO;QACT,CAAC;QAGD,MAAM,KAAK,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,SAAS,CAAC;QAEzD,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,UAAU,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class SpecListCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
usage: string;
|
|
7
|
+
execute(_args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=SpecListCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecListCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/spec/SpecListCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAWhE,qBAAa,eAAgB,SAAQ,YAAY;IAChD,IAAI,SAAe;IACnB,WAAW,SAAoB;IAC/B,KAAK,SAAgB;IAEf,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAOhE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class SpecListCommand extends SlashCommand {
|
|
3
|
+
name = 'spec:list';
|
|
4
|
+
description = 'List all specs';
|
|
5
|
+
usage = '/spec:list';
|
|
6
|
+
async execute(_args, app) {
|
|
7
|
+
try {
|
|
8
|
+
await app.listSpecs();
|
|
9
|
+
}
|
|
10
|
+
catch (error) {
|
|
11
|
+
console.log(`❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=SpecListCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecListCommand.js","sourceRoot":"","sources":["../../../../src/commands/spec/SpecListCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAYnD,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAChD,IAAI,GAAG,WAAW,CAAC;IACnB,WAAW,GAAG,gBAAgB,CAAC;IAC/B,KAAK,GAAG,YAAY,CAAC;IAErB,KAAK,CAAC,OAAO,CAAC,KAAe,EAAE,GAAgB;QAC7C,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,SAAS,EAAE,CAAC;QACxB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
import type { Application } from '../../application/Application';
|
|
3
|
+
export declare class SpecShowCommand extends SlashCommand {
|
|
4
|
+
name: string;
|
|
5
|
+
description: string;
|
|
6
|
+
usage: string;
|
|
7
|
+
execute(args: string[], app: Application): Promise<void>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=SpecShowCommand.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecShowCommand.d.ts","sourceRoot":"","sources":["../../../../src/commands/spec/SpecShowCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAWhE,qBAAa,eAAgB,SAAQ,YAAY;IAChD,IAAI,SAAe;IACnB,WAAW,SAAuB;IAClC,KAAK,SAAyB;IAExB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;CAe/D"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { SlashCommand } from '../base/SlashCommand';
|
|
2
|
+
export class SpecShowCommand extends SlashCommand {
|
|
3
|
+
name = 'spec:show';
|
|
4
|
+
description = 'Show spec details';
|
|
5
|
+
usage = '/spec:show <specId>';
|
|
6
|
+
async execute(args, app) {
|
|
7
|
+
if (args.length === 0) {
|
|
8
|
+
console.log('❌ Error: Spec ID is required');
|
|
9
|
+
console.log(`Usage: ${this.usage}`);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
const specId = args[0];
|
|
13
|
+
try {
|
|
14
|
+
await app.showSpec(specId);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
console.log(`❌ Error: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=SpecShowCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecShowCommand.js","sourceRoot":"","sources":["../../../../src/commands/spec/SpecShowCommand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAYnD,MAAM,OAAO,eAAgB,SAAQ,YAAY;IAChD,IAAI,GAAG,WAAW,CAAC;IACnB,WAAW,GAAG,mBAAmB,CAAC;IAClC,KAAK,GAAG,qBAAqB,CAAC;IAE9B,KAAK,CAAC,OAAO,CAAC,IAAc,EAAE,GAAgB;QAC5C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YACtB,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;YAC5C,OAAO,CAAC,GAAG,CAAC,UAAU,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;YACpC,OAAO;QACT,CAAC;QAED,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAEvB,IAAI,CAAC;YACH,MAAM,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC7B,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,GAAG,CAAC,YAAY,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QACtF,CAAC;IACH,CAAC;CACF"}
|