@anh3d0nic/qwen-code-termux-ice 21.1.0 → 21.2.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/core-dist/index.d.ts +6 -0
- package/core-dist/index.js +7 -0
- package/core-dist/index.js.map +1 -0
- package/core-dist/src/__mocks__/fs/promises.d.ts +11 -0
- package/core-dist/src/__mocks__/fs/promises.js +17 -0
- package/core-dist/src/__mocks__/fs/promises.js.map +1 -0
- package/core-dist/src/config/config.d.ts +648 -0
- package/core-dist/src/config/config.js +1374 -0
- package/core-dist/src/config/config.js.map +1 -0
- package/core-dist/src/config/config.test.d.ts +6 -0
- package/core-dist/src/config/config.test.js +1116 -0
- package/core-dist/src/config/config.test.js.map +1 -0
- package/core-dist/src/config/constants.d.ts +11 -0
- package/core-dist/src/config/constants.js +16 -0
- package/core-dist/src/config/constants.js.map +1 -0
- package/core-dist/src/config/models.d.ts +9 -0
- package/core-dist/src/config/models.js +10 -0
- package/core-dist/src/config/models.js.map +1 -0
- package/core-dist/src/config/storage.d.ts +38 -0
- package/core-dist/src/config/storage.js +114 -0
- package/core-dist/src/config/storage.js.map +1 -0
- package/core-dist/src/config/storage.test.d.ts +6 -0
- package/core-dist/src/config/storage.test.js +36 -0
- package/core-dist/src/config/storage.test.js.map +1 -0
- package/core-dist/src/confirmation-bus/message-bus.d.ts +22 -0
- package/core-dist/src/confirmation-bus/message-bus.js +98 -0
- package/core-dist/src/confirmation-bus/message-bus.js.map +1 -0
- package/core-dist/src/confirmation-bus/types.d.ts +104 -0
- package/core-dist/src/confirmation-bus/types.js +16 -0
- package/core-dist/src/confirmation-bus/types.js.map +1 -0
- package/core-dist/src/core/__tests__/openaiTimeoutHandling.test.d.ts +6 -0
- package/core-dist/src/core/__tests__/openaiTimeoutHandling.test.js +298 -0
- package/core-dist/src/core/__tests__/openaiTimeoutHandling.test.js.map +1 -0
- package/core-dist/src/core/__tests__/orphanedToolCallsTest.d.ts +64 -0
- package/core-dist/src/core/__tests__/orphanedToolCallsTest.js +122 -0
- package/core-dist/src/core/__tests__/orphanedToolCallsTest.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.d.ts +28 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.js +349 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.test.js +396 -0
- package/core-dist/src/core/anthropicContentGenerator/anthropicContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.d.ts +48 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.js +449 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.test.d.ts +6 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.test.js +843 -0
- package/core-dist/src/core/anthropicContentGenerator/converter.test.js.map +1 -0
- package/core-dist/src/core/anthropicContentGenerator/index.d.ts +9 -0
- package/core-dist/src/core/anthropicContentGenerator/index.js +11 -0
- package/core-dist/src/core/anthropicContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/baseLlmClient.d.ts +48 -0
- package/core-dist/src/core/baseLlmClient.js +98 -0
- package/core-dist/src/core/baseLlmClient.js.map +1 -0
- package/core-dist/src/core/baseLlmClient.test.d.ts +6 -0
- package/core-dist/src/core/baseLlmClient.test.js +319 -0
- package/core-dist/src/core/baseLlmClient.test.js.map +1 -0
- package/core-dist/src/core/client.d.ts +48 -0
- package/core-dist/src/core/client.js +547 -0
- package/core-dist/src/core/client.js.map +1 -0
- package/core-dist/src/core/client.test.d.ts +6 -0
- package/core-dist/src/core/client.test.js +1885 -0
- package/core-dist/src/core/client.test.js.map +1 -0
- package/core-dist/src/core/contentGenerator.d.ts +100 -0
- package/core-dist/src/core/contentGenerator.js +162 -0
- package/core-dist/src/core/contentGenerator.js.map +1 -0
- package/core-dist/src/core/contentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/contentGenerator.test.js +95 -0
- package/core-dist/src/core/contentGenerator.test.js.map +1 -0
- package/core-dist/src/core/coreToolScheduler.d.ts +142 -0
- package/core-dist/src/core/coreToolScheduler.js +872 -0
- package/core-dist/src/core/coreToolScheduler.js.map +1 -0
- package/core-dist/src/core/coreToolScheduler.test.d.ts +6 -0
- package/core-dist/src/core/coreToolScheduler.test.js +2221 -0
- package/core-dist/src/core/coreToolScheduler.test.js.map +1 -0
- package/core-dist/src/core/geminiChat.d.ts +122 -0
- package/core-dist/src/core/geminiChat.js +571 -0
- package/core-dist/src/core/geminiChat.js.map +1 -0
- package/core-dist/src/core/geminiChat.test.d.ts +6 -0
- package/core-dist/src/core/geminiChat.test.js +1276 -0
- package/core-dist/src/core/geminiChat.test.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.d.ts +38 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.js +193 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.test.js +304 -0
- package/core-dist/src/core/geminiContentGenerator/geminiContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/index.d.ts +12 -0
- package/core-dist/src/core/geminiContentGenerator/index.js +36 -0
- package/core-dist/src/core/geminiContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/geminiContentGenerator/index.test.d.ts +6 -0
- package/core-dist/src/core/geminiContentGenerator/index.test.js +34 -0
- package/core-dist/src/core/geminiContentGenerator/index.test.js.map +1 -0
- package/core-dist/src/core/geminiRequest.d.ts +13 -0
- package/core-dist/src/core/geminiRequest.js +11 -0
- package/core-dist/src/core/geminiRequest.js.map +1 -0
- package/core-dist/src/core/geminiRequest.test.d.ts +6 -0
- package/core-dist/src/core/geminiRequest.test.js +73 -0
- package/core-dist/src/core/geminiRequest.test.js.map +1 -0
- package/core-dist/src/core/logger.d.ts +68 -0
- package/core-dist/src/core/logger.js +364 -0
- package/core-dist/src/core/logger.js.map +1 -0
- package/core-dist/src/core/logger.test.d.ts +6 -0
- package/core-dist/src/core/logger.test.js +520 -0
- package/core-dist/src/core/logger.test.js.map +1 -0
- package/core-dist/src/core/loggingContentGenerator/index.d.ts +6 -0
- package/core-dist/src/core/loggingContentGenerator/index.js +7 -0
- package/core-dist/src/core/loggingContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.d.ts +36 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.js +321 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.js.map +1 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.test.js +287 -0
- package/core-dist/src/core/loggingContentGenerator/loggingContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/modalityDefaults.d.ts +14 -0
- package/core-dist/src/core/modalityDefaults.js +81 -0
- package/core-dist/src/core/modalityDefaults.js.map +1 -0
- package/core-dist/src/core/modalityDefaults.test.d.ts +6 -0
- package/core-dist/src/core/modalityDefaults.test.js +181 -0
- package/core-dist/src/core/modalityDefaults.test.js.map +1 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.d.ts +16 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.js +30 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.js.map +1 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.test.d.ts +6 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.test.js +296 -0
- package/core-dist/src/core/nonInteractiveToolExecutor.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/constants.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/constants.js +7 -0
- package/core-dist/src/core/openaiContentGenerator/constants.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/converter.d.ts +133 -0
- package/core-dist/src/core/openaiContentGenerator/converter.js +1020 -0
- package/core-dist/src/core/openaiContentGenerator/converter.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/converter.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/converter.test.js +1966 -0
- package/core-dist/src/core/openaiContentGenerator/converter.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.d.ts +27 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.js +84 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.test.js +267 -0
- package/core-dist/src/core/openaiContentGenerator/errorHandler.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/index.d.ts +21 -0
- package/core-dist/src/core/openaiContentGenerator/index.js +43 -0
- package/core-dist/src/core/openaiContentGenerator/index.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.d.ts +22 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.js +117 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.test.js +298 -0
- package/core-dist/src/core/openaiContentGenerator/openaiContentGenerator.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.d.ts +74 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.js +327 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.test.js +1143 -0
- package/core-dist/src/core/openaiContentGenerator/pipeline.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/README.md +61 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.d.ts +70 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.js +258 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.test.js +781 -0
- package/core-dist/src/core/openaiContentGenerator/provider/dashscope.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.d.ts +14 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.js +21 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.test.js +51 -0
- package/core-dist/src/core/openaiContentGenerator/provider/deepseek.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.d.ts +17 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.js +52 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.test.js +227 -0
- package/core-dist/src/core/openaiContentGenerator/provider/default.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/index.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/index.js +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/index.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.d.ts +17 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.js +25 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.test.js +66 -0
- package/core-dist/src/core/openaiContentGenerator/provider/modelscope.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.d.ts +8 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.js +21 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.test.js +152 -0
- package/core-dist/src/core/openaiContentGenerator/provider/openrouter.test.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/provider/types.d.ts +26 -0
- package/core-dist/src/core/openaiContentGenerator/provider/types.js +2 -0
- package/core-dist/src/core/openaiContentGenerator/provider/types.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.d.ts +157 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.js +390 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.js.map +1 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.test.d.ts +6 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.test.js +585 -0
- package/core-dist/src/core/openaiContentGenerator/streamingToolCallParser.test.js.map +1 -0
- package/core-dist/src/core/prompts.d.ts +81 -0
- package/core-dist/src/core/prompts.js +996 -0
- package/core-dist/src/core/prompts.js.map +1 -0
- package/core-dist/src/core/prompts.test.d.ts +6 -0
- package/core-dist/src/core/prompts.test.js +485 -0
- package/core-dist/src/core/prompts.test.js.map +1 -0
- package/core-dist/src/core/tokenLimits.d.ts +29 -0
- package/core-dist/src/core/tokenLimits.js +171 -0
- package/core-dist/src/core/tokenLimits.js.map +1 -0
- package/core-dist/src/core/tokenLimits.test.d.ts +1 -0
- package/core-dist/src/core/tokenLimits.test.js +270 -0
- package/core-dist/src/core/tokenLimits.test.js.map +1 -0
- package/core-dist/src/core/turn.d.ts +161 -0
- package/core-dist/src/core/turn.js +197 -0
- package/core-dist/src/core/turn.js.map +1 -0
- package/core-dist/src/core/turn.test.d.ts +6 -0
- package/core-dist/src/core/turn.test.js +817 -0
- package/core-dist/src/core/turn.test.js.map +1 -0
- package/core-dist/src/extension/claude-converter.d.ts +121 -0
- package/core-dist/src/extension/claude-converter.js +572 -0
- package/core-dist/src/extension/claude-converter.js.map +1 -0
- package/core-dist/src/extension/claude-converter.test.d.ts +6 -0
- package/core-dist/src/extension/claude-converter.test.js +305 -0
- package/core-dist/src/extension/claude-converter.test.js.map +1 -0
- package/core-dist/src/extension/extensionManager.d.ts +159 -0
- package/core-dist/src/extension/extensionManager.js +829 -0
- package/core-dist/src/extension/extensionManager.js.map +1 -0
- package/core-dist/src/extension/extensionManager.test.d.ts +6 -0
- package/core-dist/src/extension/extensionManager.test.js +598 -0
- package/core-dist/src/extension/extensionManager.test.js.map +1 -0
- package/core-dist/src/extension/extensionSettings.d.ts +33 -0
- package/core-dist/src/extension/extensionSettings.js +186 -0
- package/core-dist/src/extension/extensionSettings.js.map +1 -0
- package/core-dist/src/extension/extensionSettings.test.d.ts +1 -0
- package/core-dist/src/extension/extensionSettings.test.js +488 -0
- package/core-dist/src/extension/extensionSettings.test.js.map +1 -0
- package/core-dist/src/extension/gemini-converter.d.ts +47 -0
- package/core-dist/src/extension/gemini-converter.js +185 -0
- package/core-dist/src/extension/gemini-converter.js.map +1 -0
- package/core-dist/src/extension/gemini-converter.test.d.ts +6 -0
- package/core-dist/src/extension/gemini-converter.test.js +128 -0
- package/core-dist/src/extension/gemini-converter.test.js.map +1 -0
- package/core-dist/src/extension/github.d.ts +30 -0
- package/core-dist/src/extension/github.js +330 -0
- package/core-dist/src/extension/github.js.map +1 -0
- package/core-dist/src/extension/github.test.d.ts +6 -0
- package/core-dist/src/extension/github.test.js +376 -0
- package/core-dist/src/extension/github.test.js.map +1 -0
- package/core-dist/src/extension/index.d.ts +6 -0
- package/core-dist/src/extension/index.js +7 -0
- package/core-dist/src/extension/index.js.map +1 -0
- package/core-dist/src/extension/marketplace.d.ts +19 -0
- package/core-dist/src/extension/marketplace.js +222 -0
- package/core-dist/src/extension/marketplace.js.map +1 -0
- package/core-dist/src/extension/marketplace.test.d.ts +6 -0
- package/core-dist/src/extension/marketplace.test.js +215 -0
- package/core-dist/src/extension/marketplace.test.js.map +1 -0
- package/core-dist/src/extension/override.d.ts +25 -0
- package/core-dist/src/extension/override.js +82 -0
- package/core-dist/src/extension/override.js.map +1 -0
- package/core-dist/src/extension/override.test.d.ts +6 -0
- package/core-dist/src/extension/override.test.js +94 -0
- package/core-dist/src/extension/override.test.js.map +1 -0
- package/core-dist/src/extension/settings.d.ts +39 -0
- package/core-dist/src/extension/settings.js +116 -0
- package/core-dist/src/extension/settings.js.map +1 -0
- package/core-dist/src/extension/settings.test.d.ts +6 -0
- package/core-dist/src/extension/settings.test.js +125 -0
- package/core-dist/src/extension/settings.test.js.map +1 -0
- package/core-dist/src/extension/storage.d.ts +9 -0
- package/core-dist/src/extension/storage.js +38 -0
- package/core-dist/src/extension/storage.js.map +1 -0
- package/core-dist/src/extension/storage.test.d.ts +6 -0
- package/core-dist/src/extension/storage.test.js +64 -0
- package/core-dist/src/extension/storage.test.js.map +1 -0
- package/core-dist/src/extension/variableSchema.d.ts +40 -0
- package/core-dist/src/extension/variableSchema.js +26 -0
- package/core-dist/src/extension/variableSchema.js.map +1 -0
- package/core-dist/src/extension/variables.d.ts +21 -0
- package/core-dist/src/extension/variables.js +46 -0
- package/core-dist/src/extension/variables.js.map +1 -0
- package/core-dist/src/extension/variables.test.d.ts +6 -0
- package/core-dist/src/extension/variables.test.js +17 -0
- package/core-dist/src/extension/variables.test.js.map +1 -0
- package/core-dist/src/hooks/hookAggregator.d.ts +66 -0
- package/core-dist/src/hooks/hookAggregator.js +280 -0
- package/core-dist/src/hooks/hookAggregator.js.map +1 -0
- package/core-dist/src/hooks/hookAggregator.test.d.ts +6 -0
- package/core-dist/src/hooks/hookAggregator.test.js +449 -0
- package/core-dist/src/hooks/hookAggregator.test.js.map +1 -0
- package/core-dist/src/hooks/hookEventHandler.d.ts +42 -0
- package/core-dist/src/hooks/hookEventHandler.js +127 -0
- package/core-dist/src/hooks/hookEventHandler.js.map +1 -0
- package/core-dist/src/hooks/hookEventHandler.test.d.ts +6 -0
- package/core-dist/src/hooks/hookEventHandler.test.js +183 -0
- package/core-dist/src/hooks/hookEventHandler.test.js.map +1 -0
- package/core-dist/src/hooks/hookPlanner.d.ts +42 -0
- package/core-dist/src/hooks/hookPlanner.js +101 -0
- package/core-dist/src/hooks/hookPlanner.js.map +1 -0
- package/core-dist/src/hooks/hookPlanner.test.d.ts +6 -0
- package/core-dist/src/hooks/hookPlanner.test.js +303 -0
- package/core-dist/src/hooks/hookPlanner.test.js.map +1 -0
- package/core-dist/src/hooks/hookRegistry.d.ts +106 -0
- package/core-dist/src/hooks/hookRegistry.js +225 -0
- package/core-dist/src/hooks/hookRegistry.js.map +1 -0
- package/core-dist/src/hooks/hookRegistry.test.d.ts +6 -0
- package/core-dist/src/hooks/hookRegistry.test.js +539 -0
- package/core-dist/src/hooks/hookRegistry.test.js.map +1 -0
- package/core-dist/src/hooks/hookRunner.d.ts +40 -0
- package/core-dist/src/hooks/hookRunner.js +318 -0
- package/core-dist/src/hooks/hookRunner.js.map +1 -0
- package/core-dist/src/hooks/hookRunner.test.d.ts +6 -0
- package/core-dist/src/hooks/hookRunner.test.js +466 -0
- package/core-dist/src/hooks/hookRunner.test.js.map +1 -0
- package/core-dist/src/hooks/hookSystem.d.ts +43 -0
- package/core-dist/src/hooks/hookSystem.js +75 -0
- package/core-dist/src/hooks/hookSystem.js.map +1 -0
- package/core-dist/src/hooks/hookSystem.test.d.ts +6 -0
- package/core-dist/src/hooks/hookSystem.test.js +237 -0
- package/core-dist/src/hooks/hookSystem.test.js.map +1 -0
- package/core-dist/src/hooks/index.d.ts +16 -0
- package/core-dist/src/hooks/index.js +16 -0
- package/core-dist/src/hooks/index.js.map +1 -0
- package/core-dist/src/hooks/trustedHooks.d.ts +28 -0
- package/core-dist/src/hooks/trustedHooks.js +91 -0
- package/core-dist/src/hooks/trustedHooks.js.map +1 -0
- package/core-dist/src/hooks/types.d.ts +498 -0
- package/core-dist/src/hooks/types.js +292 -0
- package/core-dist/src/hooks/types.js.map +1 -0
- package/core-dist/src/ide/constants.d.ts +9 -0
- package/core-dist/src/ide/constants.js +10 -0
- package/core-dist/src/ide/constants.js.map +1 -0
- package/core-dist/src/ide/detect-ide.d.ts +56 -0
- package/core-dist/src/ide/detect-ide.js +68 -0
- package/core-dist/src/ide/detect-ide.js.map +1 -0
- package/core-dist/src/ide/detect-ide.test.d.ts +6 -0
- package/core-dist/src/ide/detect-ide.test.js +113 -0
- package/core-dist/src/ide/detect-ide.test.js.map +1 -0
- package/core-dist/src/ide/ide-client.d.ts +132 -0
- package/core-dist/src/ide/ide-client.js +750 -0
- package/core-dist/src/ide/ide-client.js.map +1 -0
- package/core-dist/src/ide/ide-client.test.d.ts +6 -0
- package/core-dist/src/ide/ide-client.test.js +463 -0
- package/core-dist/src/ide/ide-client.test.js.map +1 -0
- package/core-dist/src/ide/ide-installer.d.ts +14 -0
- package/core-dist/src/ide/ide-installer.js +112 -0
- package/core-dist/src/ide/ide-installer.js.map +1 -0
- package/core-dist/src/ide/ide-installer.test.d.ts +6 -0
- package/core-dist/src/ide/ide-installer.test.js +134 -0
- package/core-dist/src/ide/ide-installer.test.js.map +1 -0
- package/core-dist/src/ide/ideContext.d.ts +44 -0
- package/core-dist/src/ide/ideContext.js +101 -0
- package/core-dist/src/ide/ideContext.js.map +1 -0
- package/core-dist/src/ide/ideContext.test.d.ts +6 -0
- package/core-dist/src/ide/ideContext.test.js +393 -0
- package/core-dist/src/ide/ideContext.test.js.map +1 -0
- package/core-dist/src/ide/process-utils.d.ts +21 -0
- package/core-dist/src/ide/process-utils.js +170 -0
- package/core-dist/src/ide/process-utils.js.map +1 -0
- package/core-dist/src/ide/process-utils.test.d.ts +6 -0
- package/core-dist/src/ide/process-utils.test.js +130 -0
- package/core-dist/src/ide/process-utils.test.js.map +1 -0
- package/core-dist/src/ide/types.d.ts +486 -0
- package/core-dist/src/ide/types.js +138 -0
- package/core-dist/src/ide/types.js.map +1 -0
- package/core-dist/src/index.d.ts +179 -0
- package/core-dist/src/index.js +225 -0
- package/core-dist/src/index.js.map +1 -0
- package/core-dist/src/index.test.d.ts +6 -0
- package/core-dist/src/index.test.js +12 -0
- package/core-dist/src/index.test.js.map +1 -0
- package/core-dist/src/lsp/LspConfigLoader.d.ts +46 -0
- package/core-dist/src/lsp/LspConfigLoader.js +381 -0
- package/core-dist/src/lsp/LspConfigLoader.js.map +1 -0
- package/core-dist/src/lsp/LspConfigLoader.test.d.ts +6 -0
- package/core-dist/src/lsp/LspConfigLoader.test.js +80 -0
- package/core-dist/src/lsp/LspConfigLoader.test.js.map +1 -0
- package/core-dist/src/lsp/LspConnectionFactory.d.ts +62 -0
- package/core-dist/src/lsp/LspConnectionFactory.js +305 -0
- package/core-dist/src/lsp/LspConnectionFactory.js.map +1 -0
- package/core-dist/src/lsp/LspLanguageDetector.d.ts +39 -0
- package/core-dist/src/lsp/LspLanguageDetector.js +199 -0
- package/core-dist/src/lsp/LspLanguageDetector.js.map +1 -0
- package/core-dist/src/lsp/LspResponseNormalizer.d.ts +122 -0
- package/core-dist/src/lsp/LspResponseNormalizer.js +710 -0
- package/core-dist/src/lsp/LspResponseNormalizer.js.map +1 -0
- package/core-dist/src/lsp/LspServerManager.d.ts +87 -0
- package/core-dist/src/lsp/LspServerManager.js +563 -0
- package/core-dist/src/lsp/LspServerManager.js.map +1 -0
- package/core-dist/src/lsp/NativeLspClient.d.ts +149 -0
- package/core-dist/src/lsp/NativeLspClient.js +169 -0
- package/core-dist/src/lsp/NativeLspClient.js.map +1 -0
- package/core-dist/src/lsp/NativeLspService.d.ts +106 -0
- package/core-dist/src/lsp/NativeLspService.integration.test.d.ts +6 -0
- package/core-dist/src/lsp/NativeLspService.integration.test.js +663 -0
- package/core-dist/src/lsp/NativeLspService.integration.test.js.map +1 -0
- package/core-dist/src/lsp/NativeLspService.js +623 -0
- package/core-dist/src/lsp/NativeLspService.js.map +1 -0
- package/core-dist/src/lsp/NativeLspService.test.d.ts +6 -0
- package/core-dist/src/lsp/NativeLspService.test.js +99 -0
- package/core-dist/src/lsp/NativeLspService.test.js.map +1 -0
- package/core-dist/src/lsp/constants.d.ts +35 -0
- package/core-dist/src/lsp/constants.js +86 -0
- package/core-dist/src/lsp/constants.js.map +1 -0
- package/core-dist/src/lsp/types.d.ts +409 -0
- package/core-dist/src/lsp/types.js +7 -0
- package/core-dist/src/lsp/types.js.map +1 -0
- package/core-dist/src/mcp/constants.d.ts +22 -0
- package/core-dist/src/mcp/constants.js +23 -0
- package/core-dist/src/mcp/constants.js.map +1 -0
- package/core-dist/src/mcp/google-auth-provider.d.ts +23 -0
- package/core-dist/src/mcp/google-auth-provider.js +75 -0
- package/core-dist/src/mcp/google-auth-provider.js.map +1 -0
- package/core-dist/src/mcp/google-auth-provider.test.d.ts +6 -0
- package/core-dist/src/mcp/google-auth-provider.test.js +89 -0
- package/core-dist/src/mcp/google-auth-provider.test.js.map +1 -0
- package/core-dist/src/mcp/oauth-provider.d.ts +150 -0
- package/core-dist/src/mcp/oauth-provider.js +617 -0
- package/core-dist/src/mcp/oauth-provider.js.map +1 -0
- package/core-dist/src/mcp/oauth-provider.test.d.ts +6 -0
- package/core-dist/src/mcp/oauth-provider.test.js +917 -0
- package/core-dist/src/mcp/oauth-provider.test.js.map +1 -0
- package/core-dist/src/mcp/oauth-token-storage.d.ts +65 -0
- package/core-dist/src/mcp/oauth-token-storage.js +182 -0
- package/core-dist/src/mcp/oauth-token-storage.js.map +1 -0
- package/core-dist/src/mcp/oauth-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/oauth-token-storage.test.js +307 -0
- package/core-dist/src/mcp/oauth-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/oauth-utils.d.ts +124 -0
- package/core-dist/src/mcp/oauth-utils.js +252 -0
- package/core-dist/src/mcp/oauth-utils.js.map +1 -0
- package/core-dist/src/mcp/oauth-utils.test.d.ts +6 -0
- package/core-dist/src/mcp/oauth-utils.test.js +220 -0
- package/core-dist/src/mcp/oauth-utils.test.js.map +1 -0
- package/core-dist/src/mcp/sa-impersonation-provider.d.ts +33 -0
- package/core-dist/src/mcp/sa-impersonation-provider.js +133 -0
- package/core-dist/src/mcp/sa-impersonation-provider.js.map +1 -0
- package/core-dist/src/mcp/sa-impersonation-provider.test.d.ts +6 -0
- package/core-dist/src/mcp/sa-impersonation-provider.test.js +117 -0
- package/core-dist/src/mcp/sa-impersonation-provider.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.d.ts +19 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.js +36 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.test.js +160 -0
- package/core-dist/src/mcp/token-storage/base-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.d.ts +24 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.js +144 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.test.js +235 -0
- package/core-dist/src/mcp/token-storage/file-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.d.ts +23 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.js +78 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.test.js +193 -0
- package/core-dist/src/mcp/token-storage/hybrid-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/index.d.ts +11 -0
- package/core-dist/src/mcp/token-storage/index.js +12 -0
- package/core-dist/src/mcp/token-storage/index.js.map +1 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.d.ts +35 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.js +248 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.js.map +1 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.test.d.ts +6 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.test.js +254 -0
- package/core-dist/src/mcp/token-storage/keychain-token-storage.test.js.map +1 -0
- package/core-dist/src/mcp/token-storage/types.d.ts +38 -0
- package/core-dist/src/mcp/token-storage/types.js +11 -0
- package/core-dist/src/mcp/token-storage/types.js.map +1 -0
- package/core-dist/src/mocks/msw.d.ts +6 -0
- package/core-dist/src/mocks/msw.js +8 -0
- package/core-dist/src/mocks/msw.js.map +1 -0
- package/core-dist/src/models/constants.d.ts +71 -0
- package/core-dist/src/models/constants.js +92 -0
- package/core-dist/src/models/constants.js.map +1 -0
- package/core-dist/src/models/index.d.ts +10 -0
- package/core-dist/src/models/index.js +12 -0
- package/core-dist/src/models/index.js.map +1 -0
- package/core-dist/src/models/modelConfigErrors.d.ts +46 -0
- package/core-dist/src/models/modelConfigErrors.js +87 -0
- package/core-dist/src/models/modelConfigErrors.js.map +1 -0
- package/core-dist/src/models/modelConfigResolver.d.ts +84 -0
- package/core-dist/src/models/modelConfigResolver.js +204 -0
- package/core-dist/src/models/modelConfigResolver.js.map +1 -0
- package/core-dist/src/models/modelConfigResolver.test.d.ts +6 -0
- package/core-dist/src/models/modelConfigResolver.test.js +302 -0
- package/core-dist/src/models/modelConfigResolver.test.js.map +1 -0
- package/core-dist/src/models/modelRegistry.d.ts +55 -0
- package/core-dist/src/models/modelRegistry.js +182 -0
- package/core-dist/src/models/modelRegistry.js.map +1 -0
- package/core-dist/src/models/modelRegistry.test.d.ts +6 -0
- package/core-dist/src/models/modelRegistry.test.js +408 -0
- package/core-dist/src/models/modelRegistry.test.js.map +1 -0
- package/core-dist/src/models/modelsConfig.d.ts +343 -0
- package/core-dist/src/models/modelsConfig.js +957 -0
- package/core-dist/src/models/modelsConfig.js.map +1 -0
- package/core-dist/src/models/modelsConfig.test.d.ts +6 -0
- package/core-dist/src/models/modelsConfig.test.js +1242 -0
- package/core-dist/src/models/modelsConfig.test.js.map +1 -0
- package/core-dist/src/models/types.d.ts +114 -0
- package/core-dist/src/models/types.js +7 -0
- package/core-dist/src/models/types.js.map +1 -0
- package/core-dist/src/output/json-formatter.d.ts +11 -0
- package/core-dist/src/output/json-formatter.js +30 -0
- package/core-dist/src/output/json-formatter.js.map +1 -0
- package/core-dist/src/output/json-formatter.test.d.ts +6 -0
- package/core-dist/src/output/json-formatter.test.js +266 -0
- package/core-dist/src/output/json-formatter.test.js.map +1 -0
- package/core-dist/src/output/types.d.ts +25 -0
- package/core-dist/src/output/types.js +17 -0
- package/core-dist/src/output/types.js.map +1 -0
- package/core-dist/src/prompts/mcp-prompts.d.ts +8 -0
- package/core-dist/src/prompts/mcp-prompts.js +13 -0
- package/core-dist/src/prompts/mcp-prompts.js.map +1 -0
- package/core-dist/src/prompts/prompt-registry.d.ts +34 -0
- package/core-dist/src/prompts/prompt-registry.js +65 -0
- package/core-dist/src/prompts/prompt-registry.js.map +1 -0
- package/core-dist/src/qwen/qwenContentGenerator.d.ts +71 -0
- package/core-dist/src/qwen/qwenContentGenerator.js +182 -0
- package/core-dist/src/qwen/qwenContentGenerator.js.map +1 -0
- package/core-dist/src/qwen/qwenContentGenerator.test.d.ts +6 -0
- package/core-dist/src/qwen/qwenContentGenerator.test.js +1175 -0
- package/core-dist/src/qwen/qwenContentGenerator.test.js.map +1 -0
- package/core-dist/src/qwen/qwenOAuth2.d.ts +195 -0
- package/core-dist/src/qwen/qwenOAuth2.js +677 -0
- package/core-dist/src/qwen/qwenOAuth2.js.map +1 -0
- package/core-dist/src/qwen/qwenOAuth2.test.d.ts +6 -0
- package/core-dist/src/qwen/qwenOAuth2.test.js +1621 -0
- package/core-dist/src/qwen/qwenOAuth2.test.js.map +1 -0
- package/core-dist/src/qwen/sharedTokenManager.d.ts +196 -0
- package/core-dist/src/qwen/sharedTokenManager.js +649 -0
- package/core-dist/src/qwen/sharedTokenManager.js.map +1 -0
- package/core-dist/src/qwen/sharedTokenManager.test.d.ts +7 -0
- package/core-dist/src/qwen/sharedTokenManager.test.js +662 -0
- package/core-dist/src/qwen/sharedTokenManager.test.js.map +1 -0
- package/core-dist/src/services/chatCompressionService.d.ts +32 -0
- package/core-dist/src/services/chatCompressionService.js +213 -0
- package/core-dist/src/services/chatCompressionService.js.map +1 -0
- package/core-dist/src/services/chatCompressionService.test.d.ts +6 -0
- package/core-dist/src/services/chatCompressionService.test.js +343 -0
- package/core-dist/src/services/chatCompressionService.test.js.map +1 -0
- package/core-dist/src/services/chatRecordingService.d.ts +215 -0
- package/core-dist/src/services/chatRecordingService.js +285 -0
- package/core-dist/src/services/chatRecordingService.js.map +1 -0
- package/core-dist/src/services/chatRecordingService.test.d.ts +6 -0
- package/core-dist/src/services/chatRecordingService.test.js +299 -0
- package/core-dist/src/services/chatRecordingService.test.js.map +1 -0
- package/core-dist/src/services/fileDiscoveryService.d.ts +45 -0
- package/core-dist/src/services/fileDiscoveryService.js +104 -0
- package/core-dist/src/services/fileDiscoveryService.js.map +1 -0
- package/core-dist/src/services/fileDiscoveryService.test.d.ts +6 -0
- package/core-dist/src/services/fileDiscoveryService.test.js +143 -0
- package/core-dist/src/services/fileDiscoveryService.test.js.map +1 -0
- package/core-dist/src/services/fileSystemService.d.ts +88 -0
- package/core-dist/src/services/fileSystemService.js +131 -0
- package/core-dist/src/services/fileSystemService.js.map +1 -0
- package/core-dist/src/services/fileSystemService.test.d.ts +6 -0
- package/core-dist/src/services/fileSystemService.test.js +216 -0
- package/core-dist/src/services/fileSystemService.test.js.map +1 -0
- package/core-dist/src/services/gitService.d.ts +22 -0
- package/core-dist/src/services/gitService.js +98 -0
- package/core-dist/src/services/gitService.js.map +1 -0
- package/core-dist/src/services/gitService.test.d.ts +6 -0
- package/core-dist/src/services/gitService.test.js +187 -0
- package/core-dist/src/services/gitService.test.js.map +1 -0
- package/core-dist/src/services/loopDetectionService.d.ts +86 -0
- package/core-dist/src/services/loopDetectionService.js +239 -0
- package/core-dist/src/services/loopDetectionService.js.map +1 -0
- package/core-dist/src/services/loopDetectionService.test.d.ts +6 -0
- package/core-dist/src/services/loopDetectionService.test.js +478 -0
- package/core-dist/src/services/loopDetectionService.test.js.map +1 -0
- package/core-dist/src/services/sessionService.d.ts +200 -0
- package/core-dist/src/services/sessionService.js +527 -0
- package/core-dist/src/services/sessionService.js.map +1 -0
- package/core-dist/src/services/sessionService.test.d.ts +6 -0
- package/core-dist/src/services/sessionService.test.js +576 -0
- package/core-dist/src/services/sessionService.test.js.map +1 -0
- package/core-dist/src/services/shellExecutionService.d.ts +104 -0
- package/core-dist/src/services/shellExecutionService.js +626 -0
- package/core-dist/src/services/shellExecutionService.js.map +1 -0
- package/core-dist/src/services/shellExecutionService.test.d.ts +6 -0
- package/core-dist/src/services/shellExecutionService.test.js +684 -0
- package/core-dist/src/services/shellExecutionService.test.js.map +1 -0
- package/core-dist/src/skills/index.d.ts +19 -0
- package/core-dist/src/skills/index.js +9 -0
- package/core-dist/src/skills/index.js.map +1 -0
- package/core-dist/src/skills/skill-load.d.ts +4 -0
- package/core-dist/src/skills/skill-load.js +137 -0
- package/core-dist/src/skills/skill-load.js.map +1 -0
- package/core-dist/src/skills/skill-load.test.d.ts +6 -0
- package/core-dist/src/skills/skill-load.test.js +237 -0
- package/core-dist/src/skills/skill-load.test.js.map +1 -0
- package/core-dist/src/skills/skill-manager.d.ts +134 -0
- package/core-dist/src/skills/skill-manager.js +505 -0
- package/core-dist/src/skills/skill-manager.js.map +1 -0
- package/core-dist/src/skills/skill-manager.test.d.ts +6 -0
- package/core-dist/src/skills/skill-manager.test.js +527 -0
- package/core-dist/src/skills/skill-manager.test.js.map +1 -0
- package/core-dist/src/skills/types.d.ts +88 -0
- package/core-dist/src/skills/types.js +29 -0
- package/core-dist/src/skills/types.js.map +1 -0
- package/core-dist/src/subagents/builtin-agents.d.ts +35 -0
- package/core-dist/src/subagents/builtin-agents.js +85 -0
- package/core-dist/src/subagents/builtin-agents.js.map +1 -0
- package/core-dist/src/subagents/builtin-agents.test.d.ts +6 -0
- package/core-dist/src/subagents/builtin-agents.test.js +78 -0
- package/core-dist/src/subagents/builtin-agents.test.js.map +1 -0
- package/core-dist/src/subagents/index.d.ts +29 -0
- package/core-dist/src/subagents/index.js +15 -0
- package/core-dist/src/subagents/index.js.map +1 -0
- package/core-dist/src/subagents/subagent-events.d.ts +105 -0
- package/core-dist/src/subagents/subagent-events.js +32 -0
- package/core-dist/src/subagents/subagent-events.js.map +1 -0
- package/core-dist/src/subagents/subagent-hooks.d.ts +29 -0
- package/core-dist/src/subagents/subagent-hooks.js +7 -0
- package/core-dist/src/subagents/subagent-hooks.js.map +1 -0
- package/core-dist/src/subagents/subagent-manager.d.ts +178 -0
- package/core-dist/src/subagents/subagent-manager.js +711 -0
- package/core-dist/src/subagents/subagent-manager.js.map +1 -0
- package/core-dist/src/subagents/subagent-manager.test.d.ts +6 -0
- package/core-dist/src/subagents/subagent-manager.test.js +829 -0
- package/core-dist/src/subagents/subagent-manager.test.js.map +1 -0
- package/core-dist/src/subagents/subagent-statistics.d.ts +50 -0
- package/core-dist/src/subagents/subagent-statistics.js +210 -0
- package/core-dist/src/subagents/subagent-statistics.js.map +1 -0
- package/core-dist/src/subagents/subagent-statistics.test.d.ts +6 -0
- package/core-dist/src/subagents/subagent-statistics.test.js +238 -0
- package/core-dist/src/subagents/subagent-statistics.test.js.map +1 -0
- package/core-dist/src/subagents/subagent.d.ts +167 -0
- package/core-dist/src/subagents/subagent.js +758 -0
- package/core-dist/src/subagents/subagent.js.map +1 -0
- package/core-dist/src/subagents/subagent.test.d.ts +6 -0
- package/core-dist/src/subagents/subagent.test.js +819 -0
- package/core-dist/src/subagents/subagent.test.js.map +1 -0
- package/core-dist/src/subagents/types.d.ts +224 -0
- package/core-dist/src/subagents/types.js +58 -0
- package/core-dist/src/subagents/types.js.map +1 -0
- package/core-dist/src/subagents/types.test.d.ts +6 -0
- package/core-dist/src/subagents/types.test.js +31 -0
- package/core-dist/src/subagents/types.test.js.map +1 -0
- package/core-dist/src/subagents/validation.d.ts +63 -0
- package/core-dist/src/subagents/validation.js +293 -0
- package/core-dist/src/subagents/validation.js.map +1 -0
- package/core-dist/src/subagents/validation.test.d.ts +6 -0
- package/core-dist/src/subagents/validation.test.js +330 -0
- package/core-dist/src/subagents/validation.test.js.map +1 -0
- package/core-dist/src/telemetry/config.d.ts +31 -0
- package/core-dist/src/telemetry/config.js +74 -0
- package/core-dist/src/telemetry/config.js.map +1 -0
- package/core-dist/src/telemetry/config.test.d.ts +6 -0
- package/core-dist/src/telemetry/config.test.js +124 -0
- package/core-dist/src/telemetry/config.test.js.map +1 -0
- package/core-dist/src/telemetry/constants.d.ts +39 -0
- package/core-dist/src/telemetry/constants.js +41 -0
- package/core-dist/src/telemetry/constants.js.map +1 -0
- package/core-dist/src/telemetry/file-exporters.d.ts +29 -0
- package/core-dist/src/telemetry/file-exporters.js +62 -0
- package/core-dist/src/telemetry/file-exporters.js.map +1 -0
- package/core-dist/src/telemetry/index.d.ts +25 -0
- package/core-dist/src/telemetry/index.js +31 -0
- package/core-dist/src/telemetry/index.js.map +1 -0
- package/core-dist/src/telemetry/integration.test.circular.d.ts +6 -0
- package/core-dist/src/telemetry/integration.test.circular.js +95 -0
- package/core-dist/src/telemetry/integration.test.circular.js.map +1 -0
- package/core-dist/src/telemetry/loggers.d.ts +40 -0
- package/core-dist/src/telemetry/loggers.js +712 -0
- package/core-dist/src/telemetry/loggers.js.map +1 -0
- package/core-dist/src/telemetry/loggers.test.circular.d.ts +6 -0
- package/core-dist/src/telemetry/loggers.test.circular.js +107 -0
- package/core-dist/src/telemetry/loggers.test.circular.js.map +1 -0
- package/core-dist/src/telemetry/loggers.test.d.ts +6 -0
- package/core-dist/src/telemetry/loggers.test.js +961 -0
- package/core-dist/src/telemetry/loggers.test.js.map +1 -0
- package/core-dist/src/telemetry/metrics.d.ts +320 -0
- package/core-dist/src/telemetry/metrics.js +532 -0
- package/core-dist/src/telemetry/metrics.js.map +1 -0
- package/core-dist/src/telemetry/metrics.test.d.ts +6 -0
- package/core-dist/src/telemetry/metrics.test.js +746 -0
- package/core-dist/src/telemetry/metrics.test.js.map +1 -0
- package/core-dist/src/telemetry/qwen-logger/event-types.d.ts +89 -0
- package/core-dist/src/telemetry/qwen-logger/event-types.js +2 -0
- package/core-dist/src/telemetry/qwen-logger/event-types.js.map +1 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.d.ts +102 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.js +739 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.js.map +1 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.test.d.ts +6 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.test.js +380 -0
- package/core-dist/src/telemetry/qwen-logger/qwen-logger.test.js.map +1 -0
- package/core-dist/src/telemetry/sdk.d.ts +9 -0
- package/core-dist/src/telemetry/sdk.js +163 -0
- package/core-dist/src/telemetry/sdk.js.map +1 -0
- package/core-dist/src/telemetry/sdk.test.d.ts +6 -0
- package/core-dist/src/telemetry/sdk.test.js +116 -0
- package/core-dist/src/telemetry/sdk.test.js.map +1 -0
- package/core-dist/src/telemetry/telemetry-utils.d.ts +6 -0
- package/core-dist/src/telemetry/telemetry-utils.js +14 -0
- package/core-dist/src/telemetry/telemetry-utils.js.map +1 -0
- package/core-dist/src/telemetry/telemetry-utils.test.d.ts +6 -0
- package/core-dist/src/telemetry/telemetry-utils.test.js +40 -0
- package/core-dist/src/telemetry/telemetry-utils.test.js.map +1 -0
- package/core-dist/src/telemetry/telemetry.test.d.ts +6 -0
- package/core-dist/src/telemetry/telemetry.test.js +49 -0
- package/core-dist/src/telemetry/telemetry.test.js.map +1 -0
- package/core-dist/src/telemetry/tool-call-decision.d.ts +13 -0
- package/core-dist/src/telemetry/tool-call-decision.js +29 -0
- package/core-dist/src/telemetry/tool-call-decision.js.map +1 -0
- package/core-dist/src/telemetry/types.d.ts +363 -0
- package/core-dist/src/telemetry/types.js +635 -0
- package/core-dist/src/telemetry/types.js.map +1 -0
- package/core-dist/src/telemetry/uiTelemetry.d.ts +80 -0
- package/core-dist/src/telemetry/uiTelemetry.js +164 -0
- package/core-dist/src/telemetry/uiTelemetry.js.map +1 -0
- package/core-dist/src/telemetry/uiTelemetry.test.d.ts +6 -0
- package/core-dist/src/telemetry/uiTelemetry.test.js +625 -0
- package/core-dist/src/telemetry/uiTelemetry.test.js.map +1 -0
- package/core-dist/src/test-utils/config.d.ts +17 -0
- package/core-dist/src/test-utils/config.js +31 -0
- package/core-dist/src/test-utils/config.js.map +1 -0
- package/core-dist/src/test-utils/index.d.ts +6 -0
- package/core-dist/src/test-utils/index.js +7 -0
- package/core-dist/src/test-utils/index.js.map +1 -0
- package/core-dist/src/test-utils/mock-tool.d.ts +66 -0
- package/core-dist/src/test-utils/mock-tool.js +121 -0
- package/core-dist/src/test-utils/mock-tool.js.map +1 -0
- package/core-dist/src/test-utils/mockWorkspaceContext.d.ts +13 -0
- package/core-dist/src/test-utils/mockWorkspaceContext.js +24 -0
- package/core-dist/src/test-utils/mockWorkspaceContext.js.map +1 -0
- package/core-dist/src/tools/askUserQuestion.d.ts +41 -0
- package/core-dist/src/tools/askUserQuestion.js +247 -0
- package/core-dist/src/tools/askUserQuestion.js.map +1 -0
- package/core-dist/src/tools/askUserQuestion.test.d.ts +6 -0
- package/core-dist/src/tools/askUserQuestion.test.js +218 -0
- package/core-dist/src/tools/askUserQuestion.test.js.map +1 -0
- package/core-dist/src/tools/diffOptions.d.ts +9 -0
- package/core-dist/src/tools/diffOptions.js +46 -0
- package/core-dist/src/tools/diffOptions.js.map +1 -0
- package/core-dist/src/tools/diffOptions.test.d.ts +6 -0
- package/core-dist/src/tools/diffOptions.test.js +155 -0
- package/core-dist/src/tools/diffOptions.test.js.map +1 -0
- package/core-dist/src/tools/edit.d.ts +55 -0
- package/core-dist/src/tools/edit.js +446 -0
- package/core-dist/src/tools/edit.js.map +1 -0
- package/core-dist/src/tools/edit.test.d.ts +6 -0
- package/core-dist/src/tools/edit.test.js +742 -0
- package/core-dist/src/tools/edit.test.js.map +1 -0
- package/core-dist/src/tools/exitPlanMode.d.ts +28 -0
- package/core-dist/src/tools/exitPlanMode.js +144 -0
- package/core-dist/src/tools/exitPlanMode.js.map +1 -0
- package/core-dist/src/tools/exitPlanMode.test.d.ts +6 -0
- package/core-dist/src/tools/exitPlanMode.test.js +178 -0
- package/core-dist/src/tools/exitPlanMode.test.js.map +1 -0
- package/core-dist/src/tools/glob.d.ts +44 -0
- package/core-dist/src/tools/glob.js +195 -0
- package/core-dist/src/tools/glob.js.map +1 -0
- package/core-dist/src/tools/glob.test.d.ts +6 -0
- package/core-dist/src/tools/glob.test.js +481 -0
- package/core-dist/src/tools/glob.test.js.map +1 -0
- package/core-dist/src/tools/grep.d.ts +44 -0
- package/core-dist/src/tools/grep.js +427 -0
- package/core-dist/src/tools/grep.js.map +1 -0
- package/core-dist/src/tools/grep.test.d.ts +6 -0
- package/core-dist/src/tools/grep.test.js +360 -0
- package/core-dist/src/tools/grep.test.js.map +1 -0
- package/core-dist/src/tools/ls.d.ts +68 -0
- package/core-dist/src/tools/ls.js +221 -0
- package/core-dist/src/tools/ls.js.map +1 -0
- package/core-dist/src/tools/ls.test.d.ts +6 -0
- package/core-dist/src/tools/ls.test.js +246 -0
- package/core-dist/src/tools/ls.test.js.map +1 -0
- package/core-dist/src/tools/lsp.d.ts +66 -0
- package/core-dist/src/tools/lsp.js +894 -0
- package/core-dist/src/tools/lsp.js.map +1 -0
- package/core-dist/src/tools/lsp.test.d.ts +6 -0
- package/core-dist/src/tools/lsp.test.js +960 -0
- package/core-dist/src/tools/lsp.test.js.map +1 -0
- package/core-dist/src/tools/mcp-client-manager.d.ts +110 -0
- package/core-dist/src/tools/mcp-client-manager.js +381 -0
- package/core-dist/src/tools/mcp-client-manager.js.map +1 -0
- package/core-dist/src/tools/mcp-client-manager.test.d.ts +6 -0
- package/core-dist/src/tools/mcp-client-manager.test.js +207 -0
- package/core-dist/src/tools/mcp-client-manager.test.js.map +1 -0
- package/core-dist/src/tools/mcp-client.d.ts +199 -0
- package/core-dist/src/tools/mcp-client.js +1001 -0
- package/core-dist/src/tools/mcp-client.js.map +1 -0
- package/core-dist/src/tools/mcp-client.test.d.ts +6 -0
- package/core-dist/src/tools/mcp-client.test.js +307 -0
- package/core-dist/src/tools/mcp-client.test.js.map +1 -0
- package/core-dist/src/tools/mcp-tool.d.ts +69 -0
- package/core-dist/src/tools/mcp-tool.js +365 -0
- package/core-dist/src/tools/mcp-tool.js.map +1 -0
- package/core-dist/src/tools/mcp-tool.test.d.ts +6 -0
- package/core-dist/src/tools/mcp-tool.test.js +827 -0
- package/core-dist/src/tools/mcp-tool.test.js.map +1 -0
- package/core-dist/src/tools/memoryTool.d.ts +42 -0
- package/core-dist/src/tools/memoryTool.js +403 -0
- package/core-dist/src/tools/memoryTool.js.map +1 -0
- package/core-dist/src/tools/memoryTool.test.d.ts +6 -0
- package/core-dist/src/tools/memoryTool.test.js +416 -0
- package/core-dist/src/tools/memoryTool.test.js.map +1 -0
- package/core-dist/src/tools/modifiable-tool.d.ts +32 -0
- package/core-dist/src/tools/modifiable-tool.js +90 -0
- package/core-dist/src/tools/modifiable-tool.js.map +1 -0
- package/core-dist/src/tools/modifiable-tool.test.d.ts +6 -0
- package/core-dist/src/tools/modifiable-tool.test.js +188 -0
- package/core-dist/src/tools/modifiable-tool.test.js.map +1 -0
- package/core-dist/src/tools/read-file.d.ts +35 -0
- package/core-dist/src/tools/read-file.js +141 -0
- package/core-dist/src/tools/read-file.js.map +1 -0
- package/core-dist/src/tools/read-file.test.d.ts +6 -0
- package/core-dist/src/tools/read-file.test.js +333 -0
- package/core-dist/src/tools/read-file.test.js.map +1 -0
- package/core-dist/src/tools/ripGrep.d.ts +44 -0
- package/core-dist/src/tools/ripGrep.js +235 -0
- package/core-dist/src/tools/ripGrep.js.map +1 -0
- package/core-dist/src/tools/ripGrep.test.d.ts +6 -0
- package/core-dist/src/tools/ripGrep.test.js +529 -0
- package/core-dist/src/tools/ripGrep.test.js.map +1 -0
- package/core-dist/src/tools/sdk-control-client-transport.d.ts +67 -0
- package/core-dist/src/tools/sdk-control-client-transport.js +93 -0
- package/core-dist/src/tools/sdk-control-client-transport.js.map +1 -0
- package/core-dist/src/tools/shell.d.ts +34 -0
- package/core-dist/src/tools/shell.js +509 -0
- package/core-dist/src/tools/shell.js.map +1 -0
- package/core-dist/src/tools/shell.test.d.ts +6 -0
- package/core-dist/src/tools/shell.test.js +880 -0
- package/core-dist/src/tools/shell.test.js.map +1 -0
- package/core-dist/src/tools/skill.d.ts +45 -0
- package/core-dist/src/tools/skill.js +214 -0
- package/core-dist/src/tools/skill.js.map +1 -0
- package/core-dist/src/tools/skill.test.d.ts +6 -0
- package/core-dist/src/tools/skill.test.js +280 -0
- package/core-dist/src/tools/skill.test.js.map +1 -0
- package/core-dist/src/tools/task.d.ts +60 -0
- package/core-dist/src/tools/task.js +417 -0
- package/core-dist/src/tools/task.js.map +1 -0
- package/core-dist/src/tools/task.test.d.ts +6 -0
- package/core-dist/src/tools/task.test.js +367 -0
- package/core-dist/src/tools/task.test.js.map +1 -0
- package/core-dist/src/tools/todoWrite.d.ts +42 -0
- package/core-dist/src/tools/todoWrite.js +409 -0
- package/core-dist/src/tools/todoWrite.js.map +1 -0
- package/core-dist/src/tools/todoWrite.test.d.ts +6 -0
- package/core-dist/src/tools/todoWrite.test.js +234 -0
- package/core-dist/src/tools/todoWrite.test.js.map +1 -0
- package/core-dist/src/tools/tool-error.d.ts +45 -0
- package/core-dist/src/tools/tool-error.js +61 -0
- package/core-dist/src/tools/tool-error.js.map +1 -0
- package/core-dist/src/tools/tool-names.d.ts +60 -0
- package/core-dist/src/tools/tool-names.js +66 -0
- package/core-dist/src/tools/tool-names.js.map +1 -0
- package/core-dist/src/tools/tool-registry.d.ts +103 -0
- package/core-dist/src/tools/tool-registry.js +404 -0
- package/core-dist/src/tools/tool-registry.js.map +1 -0
- package/core-dist/src/tools/tool-registry.test.d.ts +6 -0
- package/core-dist/src/tools/tool-registry.test.js +331 -0
- package/core-dist/src/tools/tool-registry.test.js.map +1 -0
- package/core-dist/src/tools/tools.d.ts +364 -0
- package/core-dist/src/tools/tools.js +263 -0
- package/core-dist/src/tools/tools.js.map +1 -0
- package/core-dist/src/tools/tools.test.d.ts +6 -0
- package/core-dist/src/tools/tools.test.js +205 -0
- package/core-dist/src/tools/tools.test.js.map +1 -0
- package/core-dist/src/tools/web-fetch.d.ts +31 -0
- package/core-dist/src/tools/web-fetch.js +168 -0
- package/core-dist/src/tools/web-fetch.js.map +1 -0
- package/core-dist/src/tools/web-fetch.test.d.ts +6 -0
- package/core-dist/src/tools/web-fetch.test.js +134 -0
- package/core-dist/src/tools/web-fetch.test.js.map +1 -0
- package/core-dist/src/tools/web-search/base-provider.d.ts +31 -0
- package/core-dist/src/tools/web-search/base-provider.js +34 -0
- package/core-dist/src/tools/web-search/base-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/index.d.ts +24 -0
- package/core-dist/src/tools/web-search/index.js +249 -0
- package/core-dist/src/tools/web-search/index.js.map +1 -0
- package/core-dist/src/tools/web-search/index.test.d.ts +6 -0
- package/core-dist/src/tools/web-search/index.test.js +237 -0
- package/core-dist/src/tools/web-search/index.test.js.map +1 -0
- package/core-dist/src/tools/web-search/providers/dashscope-provider.d.ts +23 -0
- package/core-dist/src/tools/web-search/providers/dashscope-provider.js +120 -0
- package/core-dist/src/tools/web-search/providers/dashscope-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/providers/google-provider.d.ts +17 -0
- package/core-dist/src/tools/web-search/providers/google-provider.js +55 -0
- package/core-dist/src/tools/web-search/providers/google-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/providers/tavily-provider.d.ts +17 -0
- package/core-dist/src/tools/web-search/providers/tavily-provider.js +54 -0
- package/core-dist/src/tools/web-search/providers/tavily-provider.js.map +1 -0
- package/core-dist/src/tools/web-search/types.d.ts +138 -0
- package/core-dist/src/tools/web-search/types.js +7 -0
- package/core-dist/src/tools/web-search/types.js.map +1 -0
- package/core-dist/src/tools/web-search/utils.d.ts +28 -0
- package/core-dist/src/tools/web-search/utils.js +35 -0
- package/core-dist/src/tools/web-search/utils.js.map +1 -0
- package/core-dist/src/tools/write-file.d.ts +52 -0
- package/core-dist/src/tools/write-file.js +316 -0
- package/core-dist/src/tools/write-file.js.map +1 -0
- package/core-dist/src/tools/write-file.test.d.ts +6 -0
- package/core-dist/src/tools/write-file.test.js +613 -0
- package/core-dist/src/tools/write-file.test.js.map +1 -0
- package/core-dist/src/utils/LruCache.d.ts +13 -0
- package/core-dist/src/utils/LruCache.js +38 -0
- package/core-dist/src/utils/LruCache.js.map +1 -0
- package/core-dist/src/utils/browser.d.ts +13 -0
- package/core-dist/src/utils/browser.js +50 -0
- package/core-dist/src/utils/browser.js.map +1 -0
- package/core-dist/src/utils/configResolver.d.ts +120 -0
- package/core-dist/src/utils/configResolver.js +125 -0
- package/core-dist/src/utils/configResolver.js.map +1 -0
- package/core-dist/src/utils/configResolver.test.d.ts +6 -0
- package/core-dist/src/utils/configResolver.test.js +99 -0
- package/core-dist/src/utils/configResolver.test.js.map +1 -0
- package/core-dist/src/utils/debugLogger.d.ts +46 -0
- package/core-dist/src/utils/debugLogger.js +159 -0
- package/core-dist/src/utils/debugLogger.js.map +1 -0
- package/core-dist/src/utils/debugLogger.test.d.ts +6 -0
- package/core-dist/src/utils/debugLogger.test.js +188 -0
- package/core-dist/src/utils/debugLogger.test.js.map +1 -0
- package/core-dist/src/utils/editHelper.d.ts +58 -0
- package/core-dist/src/utils/editHelper.js +342 -0
- package/core-dist/src/utils/editHelper.js.map +1 -0
- package/core-dist/src/utils/editHelper.test.d.ts +6 -0
- package/core-dist/src/utils/editHelper.test.js +127 -0
- package/core-dist/src/utils/editHelper.test.js.map +1 -0
- package/core-dist/src/utils/editor.d.ts +37 -0
- package/core-dist/src/utils/editor.js +179 -0
- package/core-dist/src/utils/editor.js.map +1 -0
- package/core-dist/src/utils/editor.test.d.ts +6 -0
- package/core-dist/src/utils/editor.test.js +434 -0
- package/core-dist/src/utils/editor.test.js.map +1 -0
- package/core-dist/src/utils/envVarResolver.d.ts +39 -0
- package/core-dist/src/utils/envVarResolver.js +100 -0
- package/core-dist/src/utils/envVarResolver.js.map +1 -0
- package/core-dist/src/utils/envVarResolver.test.d.ts +6 -0
- package/core-dist/src/utils/envVarResolver.test.js +221 -0
- package/core-dist/src/utils/envVarResolver.test.js.map +1 -0
- package/core-dist/src/utils/environmentContext.d.ts +21 -0
- package/core-dist/src/utils/environmentContext.js +73 -0
- package/core-dist/src/utils/environmentContext.js.map +1 -0
- package/core-dist/src/utils/environmentContext.test.d.ts +6 -0
- package/core-dist/src/utils/environmentContext.test.js +151 -0
- package/core-dist/src/utils/environmentContext.test.js.map +1 -0
- package/core-dist/src/utils/errorParsing.d.ts +7 -0
- package/core-dist/src/utils/errorParsing.js +72 -0
- package/core-dist/src/utils/errorParsing.js.map +1 -0
- package/core-dist/src/utils/errorParsing.test.d.ts +6 -0
- package/core-dist/src/utils/errorParsing.test.js +87 -0
- package/core-dist/src/utils/errorParsing.test.js.map +1 -0
- package/core-dist/src/utils/errorReporting.d.ts +14 -0
- package/core-dist/src/utils/errorReporting.js +56 -0
- package/core-dist/src/utils/errorReporting.js.map +1 -0
- package/core-dist/src/utils/errorReporting.test.d.ts +6 -0
- package/core-dist/src/utils/errorReporting.test.js +84 -0
- package/core-dist/src/utils/errorReporting.test.js.map +1 -0
- package/core-dist/src/utils/errors.d.ts +44 -0
- package/core-dist/src/utils/errors.js +114 -0
- package/core-dist/src/utils/errors.js.map +1 -0
- package/core-dist/src/utils/errors.test.d.ts +6 -0
- package/core-dist/src/utils/errors.test.js +70 -0
- package/core-dist/src/utils/errors.test.js.map +1 -0
- package/core-dist/src/utils/fetch.d.ts +14 -0
- package/core-dist/src/utils/fetch.js +152 -0
- package/core-dist/src/utils/fetch.js.map +1 -0
- package/core-dist/src/utils/fetch.test.d.ts +6 -0
- package/core-dist/src/utils/fetch.test.js +40 -0
- package/core-dist/src/utils/fetch.test.js.map +1 -0
- package/core-dist/src/utils/fileUtils.d.ts +102 -0
- package/core-dist/src/utils/fileUtils.js +584 -0
- package/core-dist/src/utils/fileUtils.js.map +1 -0
- package/core-dist/src/utils/fileUtils.test.d.ts +6 -0
- package/core-dist/src/utils/fileUtils.test.js +808 -0
- package/core-dist/src/utils/fileUtils.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawlCache.d.ts +25 -0
- package/core-dist/src/utils/filesearch/crawlCache.js +57 -0
- package/core-dist/src/utils/filesearch/crawlCache.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawlCache.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/crawlCache.test.js +103 -0
- package/core-dist/src/utils/filesearch/crawlCache.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawler.d.ts +15 -0
- package/core-dist/src/utils/filesearch/crawler.js +50 -0
- package/core-dist/src/utils/filesearch/crawler.js.map +1 -0
- package/core-dist/src/utils/filesearch/crawler.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/crawler.test.js +468 -0
- package/core-dist/src/utils/filesearch/crawler.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/fileSearch.d.ts +38 -0
- package/core-dist/src/utils/filesearch/fileSearch.js +194 -0
- package/core-dist/src/utils/filesearch/fileSearch.js.map +1 -0
- package/core-dist/src/utils/filesearch/fileSearch.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/fileSearch.test.js +642 -0
- package/core-dist/src/utils/filesearch/fileSearch.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/ignore.d.ts +42 -0
- package/core-dist/src/utils/filesearch/ignore.js +106 -0
- package/core-dist/src/utils/filesearch/ignore.js.map +1 -0
- package/core-dist/src/utils/filesearch/ignore.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/ignore.test.js +144 -0
- package/core-dist/src/utils/filesearch/ignore.test.js.map +1 -0
- package/core-dist/src/utils/filesearch/result-cache.d.ts +33 -0
- package/core-dist/src/utils/filesearch/result-cache.js +59 -0
- package/core-dist/src/utils/filesearch/result-cache.js.map +1 -0
- package/core-dist/src/utils/filesearch/result-cache.test.d.ts +6 -0
- package/core-dist/src/utils/filesearch/result-cache.test.js +46 -0
- package/core-dist/src/utils/filesearch/result-cache.test.js.map +1 -0
- package/core-dist/src/utils/formatters.d.ts +6 -0
- package/core-dist/src/utils/formatters.js +16 -0
- package/core-dist/src/utils/formatters.js.map +1 -0
- package/core-dist/src/utils/generateContentResponseUtilities.d.ts +13 -0
- package/core-dist/src/utils/generateContentResponseUtilities.js +95 -0
- package/core-dist/src/utils/generateContentResponseUtilities.js.map +1 -0
- package/core-dist/src/utils/generateContentResponseUtilities.test.d.ts +6 -0
- package/core-dist/src/utils/generateContentResponseUtilities.test.js +235 -0
- package/core-dist/src/utils/generateContentResponseUtilities.test.js.map +1 -0
- package/core-dist/src/utils/getFolderStructure.d.ts +31 -0
- package/core-dist/src/utils/getFolderStructure.js +233 -0
- package/core-dist/src/utils/getFolderStructure.js.map +1 -0
- package/core-dist/src/utils/getFolderStructure.test.d.ts +6 -0
- package/core-dist/src/utils/getFolderStructure.test.js +282 -0
- package/core-dist/src/utils/getFolderStructure.test.js.map +1 -0
- package/core-dist/src/utils/getPty.d.ts +7 -0
- package/core-dist/src/utils/getPty.js +7 -0
- package/core-dist/src/utils/getPty.js.map +1 -0
- package/core-dist/src/utils/gitIgnoreParser.d.ts +16 -0
- package/core-dist/src/utils/gitIgnoreParser.js +152 -0
- package/core-dist/src/utils/gitIgnoreParser.js.map +1 -0
- package/core-dist/src/utils/gitIgnoreParser.test.d.ts +6 -0
- package/core-dist/src/utils/gitIgnoreParser.test.js +185 -0
- package/core-dist/src/utils/gitIgnoreParser.test.js.map +1 -0
- package/core-dist/src/utils/gitUtils.d.ts +21 -0
- package/core-dist/src/utils/gitUtils.js +78 -0
- package/core-dist/src/utils/gitUtils.js.map +1 -0
- package/core-dist/src/utils/iconvHelper.d.ts +33 -0
- package/core-dist/src/utils/iconvHelper.js +48 -0
- package/core-dist/src/utils/iconvHelper.js.map +1 -0
- package/core-dist/src/utils/ignorePatterns.d.ts +103 -0
- package/core-dist/src/utils/ignorePatterns.js +222 -0
- package/core-dist/src/utils/ignorePatterns.js.map +1 -0
- package/core-dist/src/utils/ignorePatterns.test.d.ts +6 -0
- package/core-dist/src/utils/ignorePatterns.test.js +255 -0
- package/core-dist/src/utils/ignorePatterns.test.js.map +1 -0
- package/core-dist/src/utils/installationManager.d.ts +16 -0
- package/core-dist/src/utils/installationManager.js +52 -0
- package/core-dist/src/utils/installationManager.js.map +1 -0
- package/core-dist/src/utils/installationManager.test.d.ts +6 -0
- package/core-dist/src/utils/installationManager.test.js +79 -0
- package/core-dist/src/utils/installationManager.test.js.map +1 -0
- package/core-dist/src/utils/jsonl-utils.d.ts +38 -0
- package/core-dist/src/utils/jsonl-utils.js +176 -0
- package/core-dist/src/utils/jsonl-utils.js.map +1 -0
- package/core-dist/src/utils/language-detection.d.ts +6 -0
- package/core-dist/src/utils/language-detection.js +101 -0
- package/core-dist/src/utils/language-detection.js.map +1 -0
- package/core-dist/src/utils/memoryDiscovery.d.ts +15 -0
- package/core-dist/src/utils/memoryDiscovery.js +238 -0
- package/core-dist/src/utils/memoryDiscovery.js.map +1 -0
- package/core-dist/src/utils/memoryDiscovery.test.d.ts +6 -0
- package/core-dist/src/utils/memoryDiscovery.test.js +212 -0
- package/core-dist/src/utils/memoryDiscovery.test.js.map +1 -0
- package/core-dist/src/utils/memoryImportProcessor.d.ts +41 -0
- package/core-dist/src/utils/memoryImportProcessor.js +296 -0
- package/core-dist/src/utils/memoryImportProcessor.js.map +1 -0
- package/core-dist/src/utils/memoryImportProcessor.test.d.ts +6 -0
- package/core-dist/src/utils/memoryImportProcessor.test.js +631 -0
- package/core-dist/src/utils/memoryImportProcessor.test.js.map +1 -0
- package/core-dist/src/utils/messageInspectors.d.ts +8 -0
- package/core-dist/src/utils/messageInspectors.js +16 -0
- package/core-dist/src/utils/messageInspectors.js.map +1 -0
- package/core-dist/src/utils/nextSpeakerChecker.d.ts +12 -0
- package/core-dist/src/utils/nextSpeakerChecker.js +99 -0
- package/core-dist/src/utils/nextSpeakerChecker.js.map +1 -0
- package/core-dist/src/utils/nextSpeakerChecker.test.d.ts +6 -0
- package/core-dist/src/utils/nextSpeakerChecker.test.js +183 -0
- package/core-dist/src/utils/nextSpeakerChecker.test.js.map +1 -0
- package/core-dist/src/utils/openaiLogger.d.ts +42 -0
- package/core-dist/src/utils/openaiLogger.js +140 -0
- package/core-dist/src/utils/openaiLogger.js.map +1 -0
- package/core-dist/src/utils/openaiLogger.test.d.ts +6 -0
- package/core-dist/src/utils/openaiLogger.test.js +314 -0
- package/core-dist/src/utils/openaiLogger.test.js.map +1 -0
- package/core-dist/src/utils/partUtils.d.ts +35 -0
- package/core-dist/src/utils/partUtils.js +133 -0
- package/core-dist/src/utils/partUtils.js.map +1 -0
- package/core-dist/src/utils/partUtils.test.d.ts +6 -0
- package/core-dist/src/utils/partUtils.test.js +241 -0
- package/core-dist/src/utils/partUtils.test.js.map +1 -0
- package/core-dist/src/utils/pathReader.d.ts +17 -0
- package/core-dist/src/utils/pathReader.js +92 -0
- package/core-dist/src/utils/pathReader.js.map +1 -0
- package/core-dist/src/utils/pathReader.test.d.ts +6 -0
- package/core-dist/src/utils/pathReader.test.js +367 -0
- package/core-dist/src/utils/pathReader.test.js.map +1 -0
- package/core-dist/src/utils/paths.d.ts +110 -0
- package/core-dist/src/utils/paths.js +269 -0
- package/core-dist/src/utils/paths.js.map +1 -0
- package/core-dist/src/utils/paths.test.d.ts +6 -0
- package/core-dist/src/utils/paths.test.js +633 -0
- package/core-dist/src/utils/paths.test.js.map +1 -0
- package/core-dist/src/utils/projectSummary.d.ts +22 -0
- package/core-dist/src/utils/projectSummary.js +86 -0
- package/core-dist/src/utils/projectSummary.js.map +1 -0
- package/core-dist/src/utils/promptIdContext.d.ts +7 -0
- package/core-dist/src/utils/promptIdContext.js +8 -0
- package/core-dist/src/utils/promptIdContext.js.map +1 -0
- package/core-dist/src/utils/quotaErrorDetection.d.ts +19 -0
- package/core-dist/src/utils/quotaErrorDetection.js +84 -0
- package/core-dist/src/utils/quotaErrorDetection.js.map +1 -0
- package/core-dist/src/utils/quotaErrorDetection.test.d.ts +6 -0
- package/core-dist/src/utils/quotaErrorDetection.test.js +104 -0
- package/core-dist/src/utils/quotaErrorDetection.test.js.map +1 -0
- package/core-dist/src/utils/qwenIgnoreParser.d.ts +18 -0
- package/core-dist/src/utils/qwenIgnoreParser.js +61 -0
- package/core-dist/src/utils/qwenIgnoreParser.js.map +1 -0
- package/core-dist/src/utils/qwenIgnoreParser.test.d.ts +6 -0
- package/core-dist/src/utils/qwenIgnoreParser.test.js +50 -0
- package/core-dist/src/utils/qwenIgnoreParser.test.js.map +1 -0
- package/core-dist/src/utils/rateLimit.d.ts +23 -0
- package/core-dist/src/utils/rateLimit.js +69 -0
- package/core-dist/src/utils/rateLimit.js.map +1 -0
- package/core-dist/src/utils/rateLimit.test.d.ts +6 -0
- package/core-dist/src/utils/rateLimit.test.js +72 -0
- package/core-dist/src/utils/rateLimit.test.js.map +1 -0
- package/core-dist/src/utils/readManyFiles.d.ts +67 -0
- package/core-dist/src/utils/readManyFiles.js +133 -0
- package/core-dist/src/utils/readManyFiles.js.map +1 -0
- package/core-dist/src/utils/readManyFiles.test.d.ts +6 -0
- package/core-dist/src/utils/readManyFiles.test.js +230 -0
- package/core-dist/src/utils/readManyFiles.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.d.ts +112 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.js +403 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.test.d.ts +6 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.test.js +114 -0
- package/core-dist/src/utils/request-tokenizer/imageTokenizer.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/index.d.ts +9 -0
- package/core-dist/src/utils/request-tokenizer/index.js +9 -0
- package/core-dist/src/utils/request-tokenizer/index.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.d.ts +52 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.js +252 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.test.d.ts +6 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.test.js +227 -0
- package/core-dist/src/utils/request-tokenizer/requestTokenizer.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/supportedImageFormats.d.ts +30 -0
- package/core-dist/src/utils/request-tokenizer/supportedImageFormats.js +41 -0
- package/core-dist/src/utils/request-tokenizer/supportedImageFormats.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.d.ts +32 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.js +54 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.test.d.ts +6 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.test.js +237 -0
- package/core-dist/src/utils/request-tokenizer/textTokenizer.test.js.map +1 -0
- package/core-dist/src/utils/request-tokenizer/types.d.ts +34 -0
- package/core-dist/src/utils/request-tokenizer/types.js +7 -0
- package/core-dist/src/utils/request-tokenizer/types.js.map +1 -0
- package/core-dist/src/utils/retry.d.ts +38 -0
- package/core-dist/src/utils/retry.js +180 -0
- package/core-dist/src/utils/retry.js.map +1 -0
- package/core-dist/src/utils/retry.test.d.ts +6 -0
- package/core-dist/src/utils/retry.test.js +402 -0
- package/core-dist/src/utils/retry.test.js.map +1 -0
- package/core-dist/src/utils/ripgrepUtils.d.ts +61 -0
- package/core-dist/src/utils/ripgrepUtils.js +227 -0
- package/core-dist/src/utils/ripgrepUtils.js.map +1 -0
- package/core-dist/src/utils/ripgrepUtils.test.d.ts +6 -0
- package/core-dist/src/utils/ripgrepUtils.test.js +101 -0
- package/core-dist/src/utils/ripgrepUtils.test.js.map +1 -0
- package/core-dist/src/utils/runtimeFetchOptions.d.ts +44 -0
- package/core-dist/src/utils/runtimeFetchOptions.js +92 -0
- package/core-dist/src/utils/runtimeFetchOptions.js.map +1 -0
- package/core-dist/src/utils/runtimeFetchOptions.test.d.ts +6 -0
- package/core-dist/src/utils/runtimeFetchOptions.test.js +70 -0
- package/core-dist/src/utils/runtimeFetchOptions.test.js.map +1 -0
- package/core-dist/src/utils/safeJsonParse.d.ts +15 -0
- package/core-dist/src/utils/safeJsonParse.js +43 -0
- package/core-dist/src/utils/safeJsonParse.js.map +1 -0
- package/core-dist/src/utils/safeJsonParse.test.d.ts +6 -0
- package/core-dist/src/utils/safeJsonParse.test.js +112 -0
- package/core-dist/src/utils/safeJsonParse.test.js.map +1 -0
- package/core-dist/src/utils/safeJsonStringify.d.ts +13 -0
- package/core-dist/src/utils/safeJsonStringify.js +25 -0
- package/core-dist/src/utils/safeJsonStringify.js.map +1 -0
- package/core-dist/src/utils/safeJsonStringify.test.d.ts +6 -0
- package/core-dist/src/utils/safeJsonStringify.test.js +61 -0
- package/core-dist/src/utils/safeJsonStringify.test.js.map +1 -0
- package/core-dist/src/utils/schemaConverter.d.ts +15 -0
- package/core-dist/src/utils/schemaConverter.js +109 -0
- package/core-dist/src/utils/schemaConverter.js.map +1 -0
- package/core-dist/src/utils/schemaConverter.test.d.ts +6 -0
- package/core-dist/src/utils/schemaConverter.test.js +106 -0
- package/core-dist/src/utils/schemaConverter.test.js.map +1 -0
- package/core-dist/src/utils/schemaValidator.d.ts +16 -0
- package/core-dist/src/utils/schemaValidator.js +123 -0
- package/core-dist/src/utils/schemaValidator.js.map +1 -0
- package/core-dist/src/utils/schemaValidator.test.d.ts +6 -0
- package/core-dist/src/utils/schemaValidator.test.js +266 -0
- package/core-dist/src/utils/schemaValidator.test.js.map +1 -0
- package/core-dist/src/utils/secure-browser-launcher.d.ts +23 -0
- package/core-dist/src/utils/secure-browser-launcher.js +165 -0
- package/core-dist/src/utils/secure-browser-launcher.js.map +1 -0
- package/core-dist/src/utils/secure-browser-launcher.test.d.ts +6 -0
- package/core-dist/src/utils/secure-browser-launcher.test.js +149 -0
- package/core-dist/src/utils/secure-browser-launcher.test.js.map +1 -0
- package/core-dist/src/utils/shell-utils.d.ts +158 -0
- package/core-dist/src/utils/shell-utils.js +739 -0
- package/core-dist/src/utils/shell-utils.js.map +1 -0
- package/core-dist/src/utils/shell-utils.test.d.ts +6 -0
- package/core-dist/src/utils/shell-utils.test.js +466 -0
- package/core-dist/src/utils/shell-utils.test.js.map +1 -0
- package/core-dist/src/utils/shellReadOnlyChecker.d.ts +6 -0
- package/core-dist/src/utils/shellReadOnlyChecker.js +290 -0
- package/core-dist/src/utils/shellReadOnlyChecker.js.map +1 -0
- package/core-dist/src/utils/shellReadOnlyChecker.test.d.ts +6 -0
- package/core-dist/src/utils/shellReadOnlyChecker.test.js +157 -0
- package/core-dist/src/utils/shellReadOnlyChecker.test.js.map +1 -0
- package/core-dist/src/utils/subagentGenerator.d.ts +20 -0
- package/core-dist/src/utils/subagentGenerator.js +120 -0
- package/core-dist/src/utils/subagentGenerator.js.map +1 -0
- package/core-dist/src/utils/subagentGenerator.test.d.ts +6 -0
- package/core-dist/src/utils/subagentGenerator.test.js +135 -0
- package/core-dist/src/utils/subagentGenerator.test.js.map +1 -0
- package/core-dist/src/utils/summarizer.d.ts +25 -0
- package/core-dist/src/utils/summarizer.js +53 -0
- package/core-dist/src/utils/summarizer.js.map +1 -0
- package/core-dist/src/utils/summarizer.test.d.ts +6 -0
- package/core-dist/src/utils/summarizer.test.js +128 -0
- package/core-dist/src/utils/summarizer.test.js.map +1 -0
- package/core-dist/src/utils/symlink.d.ts +26 -0
- package/core-dist/src/utils/symlink.js +43 -0
- package/core-dist/src/utils/symlink.js.map +1 -0
- package/core-dist/src/utils/systemEncoding.d.ts +40 -0
- package/core-dist/src/utils/systemEncoding.js +160 -0
- package/core-dist/src/utils/systemEncoding.js.map +1 -0
- package/core-dist/src/utils/systemEncoding.test.d.ts +6 -0
- package/core-dist/src/utils/systemEncoding.test.js +367 -0
- package/core-dist/src/utils/systemEncoding.test.js.map +1 -0
- package/core-dist/src/utils/terminalSerializer.d.ts +25 -0
- package/core-dist/src/utils/terminalSerializer.js +432 -0
- package/core-dist/src/utils/terminalSerializer.js.map +1 -0
- package/core-dist/src/utils/terminalSerializer.test.d.ts +6 -0
- package/core-dist/src/utils/terminalSerializer.test.js +176 -0
- package/core-dist/src/utils/terminalSerializer.test.js.map +1 -0
- package/core-dist/src/utils/testUtils.d.ts +29 -0
- package/core-dist/src/utils/testUtils.js +70 -0
- package/core-dist/src/utils/testUtils.js.map +1 -0
- package/core-dist/src/utils/textUtils.d.ts +29 -0
- package/core-dist/src/utils/textUtils.js +59 -0
- package/core-dist/src/utils/textUtils.js.map +1 -0
- package/core-dist/src/utils/textUtils.test.d.ts +6 -0
- package/core-dist/src/utils/textUtils.test.js +91 -0
- package/core-dist/src/utils/textUtils.test.js.map +1 -0
- package/core-dist/src/utils/thoughtUtils.d.ts +23 -0
- package/core-dist/src/utils/thoughtUtils.js +53 -0
- package/core-dist/src/utils/thoughtUtils.js.map +1 -0
- package/core-dist/src/utils/thoughtUtils.test.d.ts +6 -0
- package/core-dist/src/utils/thoughtUtils.test.js +78 -0
- package/core-dist/src/utils/thoughtUtils.test.js.map +1 -0
- package/core-dist/src/utils/toml-to-markdown-converter.d.ts +22 -0
- package/core-dist/src/utils/toml-to-markdown-converter.js +61 -0
- package/core-dist/src/utils/toml-to-markdown-converter.js.map +1 -0
- package/core-dist/src/utils/toml-to-markdown-converter.test.d.ts +6 -0
- package/core-dist/src/utils/toml-to-markdown-converter.test.js +73 -0
- package/core-dist/src/utils/toml-to-markdown-converter.test.js.map +1 -0
- package/core-dist/src/utils/tool-utils.d.ts +22 -0
- package/core-dist/src/utils/tool-utils.js +121 -0
- package/core-dist/src/utils/tool-utils.js.map +1 -0
- package/core-dist/src/utils/tool-utils.test.d.ts +6 -0
- package/core-dist/src/utils/tool-utils.test.js +100 -0
- package/core-dist/src/utils/tool-utils.test.js.map +1 -0
- package/core-dist/src/utils/workspaceContext.d.ts +66 -0
- package/core-dist/src/utils/workspaceContext.js +173 -0
- package/core-dist/src/utils/workspaceContext.js.map +1 -0
- package/core-dist/src/utils/workspaceContext.test.d.ts +6 -0
- package/core-dist/src/utils/workspaceContext.test.js +313 -0
- package/core-dist/src/utils/workspaceContext.test.js.map +1 -0
- package/core-dist/src/utils/yaml-parser.d.ts +29 -0
- package/core-dist/src/utils/yaml-parser.js +172 -0
- package/core-dist/src/utils/yaml-parser.js.map +1 -0
- package/core-dist/src/utils/yaml-parser.test.d.ts +6 -0
- package/core-dist/src/utils/yaml-parser.test.js +170 -0
- package/core-dist/src/utils/yaml-parser.test.js.map +1 -0
- package/core-dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +2 -1
- package/scripts/postinstall.cjs +32 -6
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
// Config
|
|
7
|
+
import { ApprovalMode } from '../config/config.js';
|
|
8
|
+
import { createDebugLogger } from '../utils/debugLogger.js';
|
|
9
|
+
const debugLogger = createDebugLogger('CLIENT');
|
|
10
|
+
import { GeminiChat } from './geminiChat.js';
|
|
11
|
+
import { getCoreSystemPrompt, getCustomSystemPrompt, getPlanModeSystemReminder, getSubagentSystemReminder, } from './prompts.js';
|
|
12
|
+
import { CompressionStatus, GeminiEventType, Turn, } from './turn.js';
|
|
13
|
+
// Services
|
|
14
|
+
import { ChatCompressionService, COMPRESSION_PRESERVE_THRESHOLD, COMPRESSION_TOKEN_THRESHOLD, } from '../services/chatCompressionService.js';
|
|
15
|
+
import { LoopDetectionService } from '../services/loopDetectionService.js';
|
|
16
|
+
// Tools
|
|
17
|
+
import { TaskTool } from '../tools/task.js';
|
|
18
|
+
// Telemetry
|
|
19
|
+
import { NextSpeakerCheckEvent, logNextSpeakerCheck, } from '../telemetry/index.js';
|
|
20
|
+
import { uiTelemetryService } from '../telemetry/uiTelemetry.js';
|
|
21
|
+
// Utilities
|
|
22
|
+
import { getDirectoryContextString, getInitialChatHistory, } from '../utils/environmentContext.js';
|
|
23
|
+
import { buildApiHistoryFromConversation, replayUiTelemetryFromConversation, } from '../services/sessionService.js';
|
|
24
|
+
import { reportError } from '../utils/errorReporting.js';
|
|
25
|
+
import { getErrorMessage } from '../utils/errors.js';
|
|
26
|
+
import { checkNextSpeaker } from '../utils/nextSpeakerChecker.js';
|
|
27
|
+
import { flatMapTextParts } from '../utils/partUtils.js';
|
|
28
|
+
import { retryWithBackoff } from '../utils/retry.js';
|
|
29
|
+
// Hook types and utilities
|
|
30
|
+
import { MessageBusType, } from '../confirmation-bus/types.js';
|
|
31
|
+
import { partToString } from '../utils/partUtils.js';
|
|
32
|
+
import { createHookOutput } from '../hooks/types.js';
|
|
33
|
+
// IDE integration
|
|
34
|
+
import { ideContextStore } from '../ide/ideContext.js';
|
|
35
|
+
import {} from '../ide/types.js';
|
|
36
|
+
const MAX_TURNS = 100;
|
|
37
|
+
export class GeminiClient {
|
|
38
|
+
config;
|
|
39
|
+
chat;
|
|
40
|
+
sessionTurnCount = 0;
|
|
41
|
+
loopDetector;
|
|
42
|
+
lastPromptId = undefined;
|
|
43
|
+
lastSentIdeContext;
|
|
44
|
+
forceFullIdeContext = true;
|
|
45
|
+
/**
|
|
46
|
+
* At any point in this conversation, was compression triggered without
|
|
47
|
+
* being forced and did it fail?
|
|
48
|
+
*/
|
|
49
|
+
hasFailedCompressionAttempt = false;
|
|
50
|
+
constructor(config) {
|
|
51
|
+
this.config = config;
|
|
52
|
+
this.loopDetector = new LoopDetectionService(config);
|
|
53
|
+
}
|
|
54
|
+
async initialize() {
|
|
55
|
+
this.lastPromptId = this.config.getSessionId();
|
|
56
|
+
// Check if we're resuming from a previous session
|
|
57
|
+
const resumedSessionData = this.config.getResumedSessionData();
|
|
58
|
+
if (resumedSessionData) {
|
|
59
|
+
replayUiTelemetryFromConversation(resumedSessionData.conversation);
|
|
60
|
+
// Convert resumed session to API history format
|
|
61
|
+
// Each ChatRecord's message field is already a Content object
|
|
62
|
+
const resumedHistory = buildApiHistoryFromConversation(resumedSessionData.conversation);
|
|
63
|
+
this.chat = await this.startChat(resumedHistory);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
this.chat = await this.startChat();
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
getContentGeneratorOrFail() {
|
|
70
|
+
if (!this.config.getContentGenerator()) {
|
|
71
|
+
throw new Error('Content generator not initialized');
|
|
72
|
+
}
|
|
73
|
+
return this.config.getContentGenerator();
|
|
74
|
+
}
|
|
75
|
+
async addHistory(content) {
|
|
76
|
+
this.getChat().addHistory(content);
|
|
77
|
+
}
|
|
78
|
+
getChat() {
|
|
79
|
+
if (!this.chat) {
|
|
80
|
+
throw new Error('Chat not initialized');
|
|
81
|
+
}
|
|
82
|
+
return this.chat;
|
|
83
|
+
}
|
|
84
|
+
isInitialized() {
|
|
85
|
+
return this.chat !== undefined;
|
|
86
|
+
}
|
|
87
|
+
getHistory() {
|
|
88
|
+
return this.getChat().getHistory();
|
|
89
|
+
}
|
|
90
|
+
stripThoughtsFromHistory() {
|
|
91
|
+
this.getChat().stripThoughtsFromHistory();
|
|
92
|
+
}
|
|
93
|
+
setHistory(history) {
|
|
94
|
+
this.getChat().setHistory(history);
|
|
95
|
+
this.forceFullIdeContext = true;
|
|
96
|
+
}
|
|
97
|
+
async setTools() {
|
|
98
|
+
const toolRegistry = this.config.getToolRegistry();
|
|
99
|
+
const toolDeclarations = toolRegistry.getFunctionDeclarations();
|
|
100
|
+
const tools = [{ functionDeclarations: toolDeclarations }];
|
|
101
|
+
this.getChat().setTools(tools);
|
|
102
|
+
}
|
|
103
|
+
async resetChat() {
|
|
104
|
+
this.chat = await this.startChat();
|
|
105
|
+
}
|
|
106
|
+
getLoopDetectionService() {
|
|
107
|
+
return this.loopDetector;
|
|
108
|
+
}
|
|
109
|
+
async addDirectoryContext() {
|
|
110
|
+
if (!this.chat) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
this.getChat().addHistory({
|
|
114
|
+
role: 'user',
|
|
115
|
+
parts: [{ text: await getDirectoryContextString(this.config) }],
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
async startChat(extraHistory) {
|
|
119
|
+
this.forceFullIdeContext = true;
|
|
120
|
+
this.hasFailedCompressionAttempt = false;
|
|
121
|
+
const toolRegistry = this.config.getToolRegistry();
|
|
122
|
+
const toolDeclarations = toolRegistry.getFunctionDeclarations();
|
|
123
|
+
const tools = [{ functionDeclarations: toolDeclarations }];
|
|
124
|
+
const history = await getInitialChatHistory(this.config, extraHistory);
|
|
125
|
+
try {
|
|
126
|
+
const userMemory = this.config.getUserMemory();
|
|
127
|
+
const model = this.config.getModel();
|
|
128
|
+
const systemInstruction = getCoreSystemPrompt(userMemory, model);
|
|
129
|
+
return new GeminiChat(this.config, {
|
|
130
|
+
systemInstruction,
|
|
131
|
+
tools,
|
|
132
|
+
}, history, this.config.getChatRecordingService());
|
|
133
|
+
}
|
|
134
|
+
catch (error) {
|
|
135
|
+
await reportError(error, 'Error initializing chat session.', history, 'startChat');
|
|
136
|
+
throw new Error(`Failed to initialize chat: ${getErrorMessage(error)}`);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
getIdeContextParts(forceFullContext) {
|
|
140
|
+
const currentIdeContext = ideContextStore.get();
|
|
141
|
+
if (!currentIdeContext) {
|
|
142
|
+
return { contextParts: [], newIdeContext: undefined };
|
|
143
|
+
}
|
|
144
|
+
if (forceFullContext || !this.lastSentIdeContext) {
|
|
145
|
+
// Send full context as plain text
|
|
146
|
+
const openFiles = currentIdeContext.workspaceState?.openFiles || [];
|
|
147
|
+
const activeFile = openFiles.find((f) => f.isActive);
|
|
148
|
+
const otherOpenFiles = openFiles
|
|
149
|
+
.filter((f) => !f.isActive)
|
|
150
|
+
.map((f) => f.path);
|
|
151
|
+
const contextLines = [];
|
|
152
|
+
if (activeFile) {
|
|
153
|
+
contextLines.push('Active file:');
|
|
154
|
+
contextLines.push(` Path: ${activeFile.path}`);
|
|
155
|
+
if (activeFile.cursor) {
|
|
156
|
+
contextLines.push(` Cursor: line ${activeFile.cursor.line}, character ${activeFile.cursor.character}`);
|
|
157
|
+
}
|
|
158
|
+
if (activeFile.selectedText) {
|
|
159
|
+
contextLines.push(' Selected text:');
|
|
160
|
+
contextLines.push('```');
|
|
161
|
+
contextLines.push(activeFile.selectedText);
|
|
162
|
+
contextLines.push('```');
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
if (otherOpenFiles.length > 0) {
|
|
166
|
+
if (contextLines.length > 0) {
|
|
167
|
+
contextLines.push('');
|
|
168
|
+
}
|
|
169
|
+
contextLines.push('Other open files:');
|
|
170
|
+
for (const filePath of otherOpenFiles) {
|
|
171
|
+
contextLines.push(` - ${filePath}`);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
if (contextLines.length === 0) {
|
|
175
|
+
return { contextParts: [], newIdeContext: currentIdeContext };
|
|
176
|
+
}
|
|
177
|
+
const contextParts = [
|
|
178
|
+
"Here is the user's editor context. This is for your information only.",
|
|
179
|
+
contextLines.join('\n'),
|
|
180
|
+
];
|
|
181
|
+
debugLogger.debug(contextParts.join('\n'));
|
|
182
|
+
return {
|
|
183
|
+
contextParts,
|
|
184
|
+
newIdeContext: currentIdeContext,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
else {
|
|
188
|
+
// Calculate and send delta as plain text
|
|
189
|
+
const changeLines = [];
|
|
190
|
+
const lastFiles = new Map((this.lastSentIdeContext.workspaceState?.openFiles || []).map((f) => [f.path, f]));
|
|
191
|
+
const currentFiles = new Map((currentIdeContext.workspaceState?.openFiles || []).map((f) => [
|
|
192
|
+
f.path,
|
|
193
|
+
f,
|
|
194
|
+
]));
|
|
195
|
+
const openedFiles = [];
|
|
196
|
+
for (const [path] of currentFiles.entries()) {
|
|
197
|
+
if (!lastFiles.has(path)) {
|
|
198
|
+
openedFiles.push(path);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
if (openedFiles.length > 0) {
|
|
202
|
+
changeLines.push('Files opened:');
|
|
203
|
+
for (const filePath of openedFiles) {
|
|
204
|
+
changeLines.push(` - ${filePath}`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
const closedFiles = [];
|
|
208
|
+
for (const [path] of lastFiles.entries()) {
|
|
209
|
+
if (!currentFiles.has(path)) {
|
|
210
|
+
closedFiles.push(path);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
if (closedFiles.length > 0) {
|
|
214
|
+
if (changeLines.length > 0) {
|
|
215
|
+
changeLines.push('');
|
|
216
|
+
}
|
|
217
|
+
changeLines.push('Files closed:');
|
|
218
|
+
for (const filePath of closedFiles) {
|
|
219
|
+
changeLines.push(` - ${filePath}`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
const lastActiveFile = (this.lastSentIdeContext.workspaceState?.openFiles || []).find((f) => f.isActive);
|
|
223
|
+
const currentActiveFile = (currentIdeContext.workspaceState?.openFiles || []).find((f) => f.isActive);
|
|
224
|
+
if (currentActiveFile) {
|
|
225
|
+
if (!lastActiveFile || lastActiveFile.path !== currentActiveFile.path) {
|
|
226
|
+
if (changeLines.length > 0) {
|
|
227
|
+
changeLines.push('');
|
|
228
|
+
}
|
|
229
|
+
changeLines.push('Active file changed:');
|
|
230
|
+
changeLines.push(` Path: ${currentActiveFile.path}`);
|
|
231
|
+
if (currentActiveFile.cursor) {
|
|
232
|
+
changeLines.push(` Cursor: line ${currentActiveFile.cursor.line}, character ${currentActiveFile.cursor.character}`);
|
|
233
|
+
}
|
|
234
|
+
if (currentActiveFile.selectedText) {
|
|
235
|
+
changeLines.push(' Selected text:');
|
|
236
|
+
changeLines.push('```');
|
|
237
|
+
changeLines.push(currentActiveFile.selectedText);
|
|
238
|
+
changeLines.push('```');
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
else {
|
|
242
|
+
const lastCursor = lastActiveFile.cursor;
|
|
243
|
+
const currentCursor = currentActiveFile.cursor;
|
|
244
|
+
if (currentCursor &&
|
|
245
|
+
(!lastCursor ||
|
|
246
|
+
lastCursor.line !== currentCursor.line ||
|
|
247
|
+
lastCursor.character !== currentCursor.character)) {
|
|
248
|
+
if (changeLines.length > 0) {
|
|
249
|
+
changeLines.push('');
|
|
250
|
+
}
|
|
251
|
+
changeLines.push('Cursor moved:');
|
|
252
|
+
changeLines.push(` Path: ${currentActiveFile.path}`);
|
|
253
|
+
changeLines.push(` New position: line ${currentCursor.line}, character ${currentCursor.character}`);
|
|
254
|
+
}
|
|
255
|
+
const lastSelectedText = lastActiveFile.selectedText || '';
|
|
256
|
+
const currentSelectedText = currentActiveFile.selectedText || '';
|
|
257
|
+
if (lastSelectedText !== currentSelectedText) {
|
|
258
|
+
if (changeLines.length > 0) {
|
|
259
|
+
changeLines.push('');
|
|
260
|
+
}
|
|
261
|
+
changeLines.push('Selection changed:');
|
|
262
|
+
changeLines.push(` Path: ${currentActiveFile.path}`);
|
|
263
|
+
if (currentSelectedText) {
|
|
264
|
+
changeLines.push(' Selected text:');
|
|
265
|
+
changeLines.push('```');
|
|
266
|
+
changeLines.push(currentSelectedText);
|
|
267
|
+
changeLines.push('```');
|
|
268
|
+
}
|
|
269
|
+
else {
|
|
270
|
+
changeLines.push(' Selected text: (none)');
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
else if (lastActiveFile) {
|
|
276
|
+
if (changeLines.length > 0) {
|
|
277
|
+
changeLines.push('');
|
|
278
|
+
}
|
|
279
|
+
changeLines.push('Active file changed:');
|
|
280
|
+
changeLines.push(' No active file');
|
|
281
|
+
changeLines.push(` Previous path: ${lastActiveFile.path}`);
|
|
282
|
+
}
|
|
283
|
+
if (changeLines.length === 0) {
|
|
284
|
+
return { contextParts: [], newIdeContext: currentIdeContext };
|
|
285
|
+
}
|
|
286
|
+
const contextParts = [
|
|
287
|
+
"Here is a summary of changes in the user's editor context. This is for your information only.",
|
|
288
|
+
changeLines.join('\n'),
|
|
289
|
+
];
|
|
290
|
+
debugLogger.debug(contextParts.join('\n'));
|
|
291
|
+
return {
|
|
292
|
+
contextParts,
|
|
293
|
+
newIdeContext: currentIdeContext,
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
async *sendMessageStream(request, signal, prompt_id, options, turns = MAX_TURNS) {
|
|
298
|
+
// Fire UserPromptSubmit hook through MessageBus (only if hooks are enabled)
|
|
299
|
+
const hooksEnabled = this.config.getEnableHooks();
|
|
300
|
+
const messageBus = this.config.getMessageBus();
|
|
301
|
+
if (hooksEnabled && messageBus) {
|
|
302
|
+
const promptText = partToString(request);
|
|
303
|
+
const response = await messageBus.request({
|
|
304
|
+
type: MessageBusType.HOOK_EXECUTION_REQUEST,
|
|
305
|
+
eventName: 'UserPromptSubmit',
|
|
306
|
+
input: {
|
|
307
|
+
prompt: promptText,
|
|
308
|
+
},
|
|
309
|
+
}, MessageBusType.HOOK_EXECUTION_RESPONSE);
|
|
310
|
+
const hookOutput = response.output
|
|
311
|
+
? createHookOutput('UserPromptSubmit', response.output)
|
|
312
|
+
: undefined;
|
|
313
|
+
if (hookOutput?.isBlockingDecision() ||
|
|
314
|
+
hookOutput?.shouldStopExecution()) {
|
|
315
|
+
yield {
|
|
316
|
+
type: GeminiEventType.Error,
|
|
317
|
+
value: {
|
|
318
|
+
error: new Error(`UserPromptSubmit hook blocked processing: ${hookOutput.getEffectiveReason()}`),
|
|
319
|
+
},
|
|
320
|
+
};
|
|
321
|
+
return new Turn(this.getChat(), prompt_id);
|
|
322
|
+
}
|
|
323
|
+
// Add additional context from hooks to the request
|
|
324
|
+
const additionalContext = hookOutput?.getAdditionalContext();
|
|
325
|
+
if (additionalContext) {
|
|
326
|
+
const requestArray = Array.isArray(request) ? request : [request];
|
|
327
|
+
request = [...requestArray, { text: additionalContext }];
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
if (!options?.isContinuation) {
|
|
331
|
+
this.loopDetector.reset(prompt_id);
|
|
332
|
+
this.lastPromptId = prompt_id;
|
|
333
|
+
// record user message for session management
|
|
334
|
+
this.config.getChatRecordingService()?.recordUserMessage(request);
|
|
335
|
+
// strip thoughts from history before sending the message
|
|
336
|
+
this.stripThoughtsFromHistory();
|
|
337
|
+
}
|
|
338
|
+
this.sessionTurnCount++;
|
|
339
|
+
if (this.config.getMaxSessionTurns() > 0 &&
|
|
340
|
+
this.sessionTurnCount > this.config.getMaxSessionTurns()) {
|
|
341
|
+
yield { type: GeminiEventType.MaxSessionTurns };
|
|
342
|
+
return new Turn(this.getChat(), prompt_id);
|
|
343
|
+
}
|
|
344
|
+
// Ensure turns never exceeds MAX_TURNS to prevent infinite loops
|
|
345
|
+
const boundedTurns = Math.min(turns, MAX_TURNS);
|
|
346
|
+
if (!boundedTurns) {
|
|
347
|
+
return new Turn(this.getChat(), prompt_id);
|
|
348
|
+
}
|
|
349
|
+
const compressed = await this.tryCompressChat(prompt_id, false);
|
|
350
|
+
if (compressed.compressionStatus === CompressionStatus.COMPRESSED) {
|
|
351
|
+
yield { type: GeminiEventType.ChatCompressed, value: compressed };
|
|
352
|
+
}
|
|
353
|
+
// Check session token limit after compression.
|
|
354
|
+
// `lastPromptTokenCount` is treated as authoritative for the (possibly compressed) history;
|
|
355
|
+
const sessionTokenLimit = this.config.getSessionTokenLimit();
|
|
356
|
+
if (sessionTokenLimit > 0) {
|
|
357
|
+
const lastPromptTokenCount = uiTelemetryService.getLastPromptTokenCount();
|
|
358
|
+
if (lastPromptTokenCount > sessionTokenLimit) {
|
|
359
|
+
yield {
|
|
360
|
+
type: GeminiEventType.SessionTokenLimitExceeded,
|
|
361
|
+
value: {
|
|
362
|
+
currentTokens: lastPromptTokenCount,
|
|
363
|
+
limit: sessionTokenLimit,
|
|
364
|
+
message: `Session token limit exceeded: ${lastPromptTokenCount} tokens > ${sessionTokenLimit} limit. ` +
|
|
365
|
+
'Please start a new session or increase the sessionTokenLimit in your settings.json.',
|
|
366
|
+
},
|
|
367
|
+
};
|
|
368
|
+
return new Turn(this.getChat(), prompt_id);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
// Prevent context updates from being sent while a tool call is
|
|
372
|
+
// waiting for a response. The Qwen API requires that a functionResponse
|
|
373
|
+
// part from the user immediately follows a functionCall part from the model
|
|
374
|
+
// in the conversation history . The IDE context is not discarded; it will
|
|
375
|
+
// be included in the next regular message sent to the model.
|
|
376
|
+
const history = this.getHistory();
|
|
377
|
+
const lastMessage = history.length > 0 ? history[history.length - 1] : undefined;
|
|
378
|
+
const hasPendingToolCall = !!lastMessage &&
|
|
379
|
+
lastMessage.role === 'model' &&
|
|
380
|
+
(lastMessage.parts?.some((p) => 'functionCall' in p) || false);
|
|
381
|
+
if (this.config.getIdeMode() && !hasPendingToolCall) {
|
|
382
|
+
const { contextParts, newIdeContext } = this.getIdeContextParts(this.forceFullIdeContext || history.length === 0);
|
|
383
|
+
if (contextParts.length > 0) {
|
|
384
|
+
this.getChat().addHistory({
|
|
385
|
+
role: 'user',
|
|
386
|
+
parts: [{ text: contextParts.join('\n') }],
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
this.lastSentIdeContext = newIdeContext;
|
|
390
|
+
this.forceFullIdeContext = false;
|
|
391
|
+
}
|
|
392
|
+
const turn = new Turn(this.getChat(), prompt_id);
|
|
393
|
+
// append system reminders to the request
|
|
394
|
+
let requestToSent = await flatMapTextParts(request, async (text) => [text]);
|
|
395
|
+
if (!options?.isContinuation) {
|
|
396
|
+
const systemReminders = [];
|
|
397
|
+
// add subagent system reminder if there are subagents
|
|
398
|
+
const hasTaskTool = this.config.getToolRegistry().getTool(TaskTool.Name);
|
|
399
|
+
const subagents = (await this.config.getSubagentManager().listSubagents())
|
|
400
|
+
.filter((subagent) => subagent.level !== 'builtin')
|
|
401
|
+
.map((subagent) => subagent.name);
|
|
402
|
+
if (hasTaskTool && subagents.length > 0) {
|
|
403
|
+
systemReminders.push(getSubagentSystemReminder(subagents));
|
|
404
|
+
}
|
|
405
|
+
// add plan mode system reminder if approval mode is plan
|
|
406
|
+
if (this.config.getApprovalMode() === ApprovalMode.PLAN) {
|
|
407
|
+
systemReminders.push(getPlanModeSystemReminder(this.config.getSdkMode()));
|
|
408
|
+
}
|
|
409
|
+
requestToSent = [...systemReminders, ...requestToSent];
|
|
410
|
+
}
|
|
411
|
+
const resultStream = turn.run(this.config.getModel(), requestToSent, signal);
|
|
412
|
+
for await (const event of resultStream) {
|
|
413
|
+
if (!this.config.getSkipLoopDetection()) {
|
|
414
|
+
if (this.loopDetector.addAndCheck(event)) {
|
|
415
|
+
yield { type: GeminiEventType.LoopDetected };
|
|
416
|
+
return turn;
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
yield event;
|
|
420
|
+
if (event.type === GeminiEventType.Error) {
|
|
421
|
+
return turn;
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
// Fire Stop hook through MessageBus (only if hooks are enabled)
|
|
425
|
+
// This must be done before any early returns to ensure hooks are always triggered
|
|
426
|
+
if (hooksEnabled && messageBus && !turn.pendingToolCalls.length) {
|
|
427
|
+
// Get response text from the chat history
|
|
428
|
+
const history = this.getHistory();
|
|
429
|
+
const lastModelMessage = history
|
|
430
|
+
.filter((msg) => msg.role === 'model')
|
|
431
|
+
.pop();
|
|
432
|
+
const responseText = lastModelMessage?.parts
|
|
433
|
+
?.filter((p) => 'text' in p)
|
|
434
|
+
.map((p) => p.text)
|
|
435
|
+
.join('') || '[no response text]';
|
|
436
|
+
const response = await messageBus.request({
|
|
437
|
+
type: MessageBusType.HOOK_EXECUTION_REQUEST,
|
|
438
|
+
eventName: 'Stop',
|
|
439
|
+
input: {
|
|
440
|
+
stop_hook_active: true,
|
|
441
|
+
last_assistant_message: responseText,
|
|
442
|
+
},
|
|
443
|
+
}, MessageBusType.HOOK_EXECUTION_RESPONSE);
|
|
444
|
+
const hookOutput = response.output
|
|
445
|
+
? createHookOutput('Stop', response.output)
|
|
446
|
+
: undefined;
|
|
447
|
+
const stopOutput = hookOutput;
|
|
448
|
+
// For Stop hooks, blocking/stop execution should force continuation
|
|
449
|
+
if (stopOutput?.isBlockingDecision() ||
|
|
450
|
+
stopOutput?.shouldStopExecution()) {
|
|
451
|
+
// Emit system message if provided (e.g., "🔄 Ralph iteration 5")
|
|
452
|
+
if (stopOutput.systemMessage) {
|
|
453
|
+
yield {
|
|
454
|
+
type: GeminiEventType.HookSystemMessage,
|
|
455
|
+
value: stopOutput.systemMessage,
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
const continueReason = stopOutput.getEffectiveReason();
|
|
459
|
+
const continueRequest = [{ text: continueReason }];
|
|
460
|
+
return yield* this.sendMessageStream(continueRequest, signal, prompt_id, { isContinuation: true }, boundedTurns - 1);
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
if (!turn.pendingToolCalls.length && signal && !signal.aborted) {
|
|
464
|
+
if (this.config.getSkipNextSpeakerCheck()) {
|
|
465
|
+
return turn;
|
|
466
|
+
}
|
|
467
|
+
const nextSpeakerCheck = await checkNextSpeaker(this.getChat(), this.config, signal, prompt_id);
|
|
468
|
+
logNextSpeakerCheck(this.config, new NextSpeakerCheckEvent(prompt_id, turn.finishReason?.toString() || '', nextSpeakerCheck?.next_speaker || ''));
|
|
469
|
+
if (nextSpeakerCheck?.next_speaker === 'model') {
|
|
470
|
+
const nextRequest = [{ text: 'Please continue.' }];
|
|
471
|
+
// This recursive call's events will be yielded out, and the final
|
|
472
|
+
// turn object from the recursive call will be returned.
|
|
473
|
+
return yield* this.sendMessageStream(nextRequest, signal, prompt_id, options, boundedTurns - 1);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
return turn;
|
|
477
|
+
}
|
|
478
|
+
async generateContent(contents, generationConfig, abortSignal, model) {
|
|
479
|
+
let currentAttemptModel = model;
|
|
480
|
+
try {
|
|
481
|
+
const userMemory = this.config.getUserMemory();
|
|
482
|
+
const finalSystemInstruction = generationConfig.systemInstruction
|
|
483
|
+
? getCustomSystemPrompt(generationConfig.systemInstruction, userMemory)
|
|
484
|
+
: getCoreSystemPrompt(userMemory, this.config.getModel());
|
|
485
|
+
const requestConfig = {
|
|
486
|
+
abortSignal,
|
|
487
|
+
...generationConfig,
|
|
488
|
+
systemInstruction: finalSystemInstruction,
|
|
489
|
+
};
|
|
490
|
+
const apiCall = () => {
|
|
491
|
+
currentAttemptModel = model;
|
|
492
|
+
return this.getContentGeneratorOrFail().generateContent({
|
|
493
|
+
model,
|
|
494
|
+
config: requestConfig,
|
|
495
|
+
contents,
|
|
496
|
+
}, this.lastPromptId);
|
|
497
|
+
};
|
|
498
|
+
const result = await retryWithBackoff(apiCall, {
|
|
499
|
+
authType: this.config.getContentGeneratorConfig()?.authType,
|
|
500
|
+
});
|
|
501
|
+
return result;
|
|
502
|
+
}
|
|
503
|
+
catch (error) {
|
|
504
|
+
if (abortSignal.aborted) {
|
|
505
|
+
throw error;
|
|
506
|
+
}
|
|
507
|
+
await reportError(error, `Error generating content via API with model ${currentAttemptModel}.`, {
|
|
508
|
+
requestContents: contents,
|
|
509
|
+
requestConfig: generationConfig,
|
|
510
|
+
}, 'generateContent-api');
|
|
511
|
+
throw new Error(`Failed to generate content with model ${currentAttemptModel}: ${getErrorMessage(error)}`);
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
async tryCompressChat(prompt_id, force = false) {
|
|
515
|
+
const compressionService = new ChatCompressionService();
|
|
516
|
+
const { newHistory, info } = await compressionService.compress(this.getChat(), prompt_id, force, this.config.getModel(), this.config, this.hasFailedCompressionAttempt);
|
|
517
|
+
// Handle compression result
|
|
518
|
+
if (info.compressionStatus === CompressionStatus.COMPRESSED) {
|
|
519
|
+
// Success: update chat with new compressed history
|
|
520
|
+
if (newHistory) {
|
|
521
|
+
const chatRecordingService = this.config.getChatRecordingService();
|
|
522
|
+
chatRecordingService?.recordChatCompression({
|
|
523
|
+
info,
|
|
524
|
+
compressedHistory: newHistory,
|
|
525
|
+
});
|
|
526
|
+
this.chat = await this.startChat(newHistory);
|
|
527
|
+
uiTelemetryService.setLastPromptTokenCount(info.newTokenCount);
|
|
528
|
+
this.forceFullIdeContext = true;
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
else if (info.compressionStatus ===
|
|
532
|
+
CompressionStatus.COMPRESSION_FAILED_INFLATED_TOKEN_COUNT ||
|
|
533
|
+
info.compressionStatus ===
|
|
534
|
+
CompressionStatus.COMPRESSION_FAILED_EMPTY_SUMMARY) {
|
|
535
|
+
// Track failed attempts (only mark as failed if not forced)
|
|
536
|
+
if (!force) {
|
|
537
|
+
this.hasFailedCompressionAttempt = true;
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
return info;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
export const TEST_ONLY = {
|
|
544
|
+
COMPRESSION_PRESERVE_THRESHOLD,
|
|
545
|
+
COMPRESSION_TOKEN_THRESHOLD,
|
|
546
|
+
};
|
|
547
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../../src/core/client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA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