@opensumi/ide-ai-native 3.7.2-next-1740450374.0 → 3.7.2-next-1741226843.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/lib/browser/ai-core.contextkeys.d.ts +0 -1
- package/lib/browser/ai-core.contextkeys.d.ts.map +1 -1
- package/lib/browser/ai-core.contextkeys.js +0 -1
- package/lib/browser/ai-core.contextkeys.js.map +1 -1
- package/lib/browser/ai-core.contribution.d.ts +2 -8
- package/lib/browser/ai-core.contribution.d.ts.map +1 -1
- package/lib/browser/ai-core.contribution.js +20 -149
- package/lib/browser/ai-core.contribution.js.map +1 -1
- package/lib/browser/chat/chat-agent.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-agent.service.js +0 -6
- package/lib/browser/chat/chat-agent.service.js.map +1 -1
- package/lib/browser/chat/chat-manager.service.d.ts +2 -30
- package/lib/browser/chat/chat-manager.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-manager.service.js +1 -45
- package/lib/browser/chat/chat-manager.service.js.map +1 -1
- package/lib/browser/chat/chat-model.d.ts +7 -34
- package/lib/browser/chat/chat-model.d.ts.map +1 -1
- package/lib/browser/chat/chat-model.js +57 -71
- package/lib/browser/chat/chat-model.js.map +1 -1
- package/lib/browser/chat/chat-proxy.service.d.ts +1 -6
- package/lib/browser/chat/chat-proxy.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-proxy.service.js +3 -54
- package/lib/browser/chat/chat-proxy.service.js.map +1 -1
- package/lib/browser/chat/chat.api.service.d.ts +1 -1
- package/lib/browser/chat/chat.api.service.d.ts.map +1 -1
- package/lib/browser/chat/chat.api.service.js +2 -2
- package/lib/browser/chat/chat.api.service.js.map +1 -1
- package/lib/browser/chat/chat.internal.service.d.ts +2 -8
- package/lib/browser/chat/chat.internal.service.d.ts.map +1 -1
- package/lib/browser/chat/chat.internal.service.js +13 -41
- package/lib/browser/chat/chat.internal.service.js.map +1 -1
- package/lib/browser/chat/chat.module.less +41 -17
- package/lib/browser/chat/chat.view.d.ts.map +1 -1
- package/lib/browser/chat/chat.view.js +14 -102
- package/lib/browser/chat/chat.view.js.map +1 -1
- package/lib/browser/components/ChatEditor.d.ts +0 -1
- package/lib/browser/components/ChatEditor.d.ts.map +1 -1
- package/lib/browser/components/ChatEditor.js +3 -3
- package/lib/browser/components/ChatEditor.js.map +1 -1
- package/lib/browser/components/ChatInput.d.ts.map +1 -1
- package/lib/browser/components/ChatInput.js.map +1 -1
- package/lib/browser/components/ChatMarkdown.d.ts +0 -1
- package/lib/browser/components/ChatMarkdown.d.ts.map +1 -1
- package/lib/browser/components/ChatMarkdown.js +2 -2
- package/lib/browser/components/ChatMarkdown.js.map +1 -1
- package/lib/browser/components/ChatReply.d.ts.map +1 -1
- package/lib/browser/components/ChatReply.js +4 -29
- package/lib/browser/components/ChatReply.js.map +1 -1
- package/lib/browser/components/ChatThinking.js +1 -1
- package/lib/browser/components/ChatThinking.js.map +1 -1
- package/lib/browser/components/WelcomeMsg.js.map +1 -1
- package/lib/browser/components/components.module.less +31 -33
- package/lib/browser/components/utils.d.ts +2 -2
- package/lib/browser/contrib/intelligent-completions/index.d.ts +9 -16
- package/lib/browser/contrib/intelligent-completions/index.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/index.js +1 -6
- package/lib/browser/contrib/intelligent-completions/index.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.d.ts +0 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.js +4 -26
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.d.ts +5 -5
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.js +48 -59
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.feature.registry.d.ts +0 -4
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.feature.registry.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.feature.registry.js +0 -7
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.feature.registry.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/base.d.ts +5 -14
- package/lib/browser/contrib/intelligent-completions/source/base.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/base.js +8 -29
- package/lib/browser/contrib/intelligent-completions/source/base.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.d.ts +3 -10
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.js +22 -95
- package/lib/browser/contrib/intelligent-completions/source/line-change.source.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.d.ts +3 -1
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.js +20 -13
- package/lib/browser/contrib/intelligent-completions/source/lint-error.source.js.map +1 -1
- package/lib/browser/contrib/terminal/component/terminal-command-suggest-controller.js +2 -2
- package/lib/browser/contrib/terminal/component/terminal-command-suggest-controller.js.map +1 -1
- package/lib/browser/index.d.ts +3 -11
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +4 -56
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/languages/tree-sitter/wasm-manager.d.ts.map +1 -1
- package/lib/browser/languages/tree-sitter/wasm-manager.js +2 -14
- package/lib/browser/languages/tree-sitter/wasm-manager.js.map +1 -1
- package/lib/browser/layout/ai-layout.d.ts.map +1 -1
- package/lib/browser/layout/ai-layout.js +2 -2
- package/lib/browser/layout/ai-layout.js.map +1 -1
- package/lib/browser/layout/layout.module.less +9 -9
- package/lib/browser/layout/tabbar.view.d.ts.map +1 -1
- package/lib/browser/layout/tabbar.view.js +6 -5
- package/lib/browser/layout/tabbar.view.js.map +1 -1
- package/lib/browser/model/enhanceDecorationsCollection.d.ts +10 -14
- package/lib/browser/model/enhanceDecorationsCollection.d.ts.map +1 -1
- package/lib/browser/model/enhanceDecorationsCollection.js +53 -42
- package/lib/browser/model/enhanceDecorationsCollection.js.map +1 -1
- package/lib/browser/model/msg-history-manager.d.ts +1 -20
- package/lib/browser/model/msg-history-manager.d.ts.map +1 -1
- package/lib/browser/model/msg-history-manager.js +10 -46
- package/lib/browser/model/msg-history-manager.js.map +1 -1
- package/lib/browser/model/styles.module.less +7 -0
- package/lib/browser/preferences/schema.d.ts.map +1 -1
- package/lib/browser/preferences/schema.js +0 -69
- package/lib/browser/preferences/schema.js.map +1 -1
- package/lib/browser/types.d.ts +4 -74
- package/lib/browser/types.d.ts.map +1 -1
- package/lib/browser/types.js +1 -4
- package/lib/browser/types.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.d.ts +1 -2
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.js +49 -21
- package/lib/browser/widget/inline-chat/inline-chat-editor.controller.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.d.ts +13 -3
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.js +72 -24
- package/lib/browser/widget/inline-chat/inline-chat.feature.registry.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.service.d.ts +6 -1
- package/lib/browser/widget/inline-chat/inline-chat.service.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat.service.js +17 -5
- package/lib/browser/widget/inline-chat/inline-chat.service.js.map +1 -1
- package/lib/browser/widget/inline-chat/inline-content-widget.d.ts +5 -2
- package/lib/browser/widget/inline-chat/inline-content-widget.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-content-widget.js +42 -17
- package/lib/browser/widget/inline-chat/inline-content-widget.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-previewer.d.ts +5 -22
- package/lib/browser/widget/inline-diff/inline-diff-previewer.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-previewer.js +30 -61
- package/lib/browser/widget/inline-diff/inline-diff-previewer.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff.controller.d.ts +12 -8
- package/lib/browser/widget/inline-diff/inline-diff.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff.controller.js +96 -68
- package/lib/browser/widget/inline-diff/inline-diff.controller.js.map +1 -1
- package/lib/browser/widget/inline-hint/inline-hint.controller.d.ts +1 -0
- package/lib/browser/widget/inline-hint/inline-hint.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-hint/inline-hint.controller.js +5 -0
- package/lib/browser/widget/inline-hint/inline-hint.controller.js.map +1 -1
- package/lib/browser/widget/inline-input/inline-input-widget.d.ts +2 -12
- package/lib/browser/widget/inline-input/inline-input-widget.d.ts.map +1 -1
- package/lib/browser/widget/inline-input/inline-input-widget.js +18 -26
- package/lib/browser/widget/inline-input/inline-input-widget.js.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.controller.d.ts +5 -14
- package/lib/browser/widget/inline-input/inline-input.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.controller.js +165 -321
- package/lib/browser/widget/inline-input/inline-input.controller.js.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.module.less +0 -4
- package/lib/browser/widget/inline-input/inline-input.service.d.ts +7 -19
- package/lib/browser/widget/inline-input/inline-input.service.d.ts.map +1 -1
- package/lib/browser/widget/inline-input/inline-input.service.js +12 -72
- package/lib/browser/widget/inline-input/inline-input.service.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.d.ts +19 -9
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.js +39 -47
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.component.d.ts +4 -21
- package/lib/browser/widget/inline-stream-diff/live-preview.component.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.component.js +5 -37
- package/lib/browser/widget/inline-stream-diff/live-preview.component.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.d.ts +11 -7
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.d.ts.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.js +77 -34
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.js.map +1 -1
- package/lib/common/index.d.ts +0 -10
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +1 -4
- package/lib/common/index.js.map +1 -1
- package/lib/common/types.d.ts +0 -17
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/utils.d.ts +0 -1
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +3 -5
- package/lib/common/utils.js.map +1 -1
- package/lib/node/index.d.ts.map +1 -1
- package/lib/node/index.js +0 -19
- package/lib/node/index.js.map +1 -1
- package/package.json +22 -33
- package/src/browser/ai-core.contextkeys.ts +0 -3
- package/src/browser/ai-core.contribution.ts +21 -167
- package/src/browser/chat/chat-agent.service.ts +0 -7
- package/src/browser/chat/chat-manager.service.ts +7 -83
- package/src/browser/chat/chat-model.ts +20 -86
- package/src/browser/chat/chat-proxy.service.ts +3 -55
- package/src/browser/chat/chat.api.service.ts +2 -2
- package/src/browser/chat/chat.internal.service.ts +6 -35
- package/src/browser/chat/chat.module.less +41 -17
- package/src/browser/chat/chat.view.tsx +45 -191
- package/src/browser/components/ChatEditor.tsx +10 -13
- package/src/browser/components/ChatInput.tsx +0 -1
- package/src/browser/components/ChatMarkdown.tsx +2 -4
- package/src/browser/components/ChatReply.tsx +9 -38
- package/src/browser/components/ChatThinking.tsx +1 -1
- package/src/browser/components/WelcomeMsg.tsx +1 -1
- package/src/browser/components/components.module.less +31 -33
- package/src/browser/contrib/intelligent-completions/index.ts +4 -19
- package/src/browser/contrib/intelligent-completions/intelligent-completions.contribution.ts +8 -32
- package/src/browser/contrib/intelligent-completions/intelligent-completions.controller.ts +67 -102
- package/src/browser/contrib/intelligent-completions/intelligent-completions.feature.registry.ts +0 -11
- package/src/browser/contrib/intelligent-completions/source/base.ts +14 -39
- package/src/browser/contrib/intelligent-completions/source/line-change.source.ts +22 -129
- package/src/browser/contrib/intelligent-completions/source/lint-error.source.ts +31 -19
- package/src/browser/contrib/terminal/component/terminal-command-suggest-controller.tsx +1 -1
- package/src/browser/index.ts +6 -69
- package/src/browser/languages/tree-sitter/wasm-manager.ts +2 -12
- package/src/browser/layout/ai-layout.tsx +2 -5
- package/src/browser/layout/layout.module.less +9 -9
- package/src/browser/layout/tabbar.view.tsx +8 -10
- package/src/browser/model/enhanceDecorationsCollection.ts +77 -62
- package/src/browser/model/msg-history-manager.ts +2 -56
- package/src/browser/model/styles.module.less +7 -0
- package/src/browser/preferences/schema.ts +0 -69
- package/src/browser/types.ts +5 -100
- package/src/browser/widget/inline-chat/inline-chat-editor.controller.ts +65 -30
- package/src/browser/widget/inline-chat/inline-chat.feature.registry.ts +90 -23
- package/src/browser/widget/inline-chat/inline-chat.service.ts +17 -2
- package/src/browser/widget/inline-chat/inline-content-widget.tsx +69 -14
- package/src/browser/widget/inline-diff/inline-diff-previewer.ts +32 -87
- package/src/browser/widget/inline-diff/inline-diff.controller.ts +114 -90
- package/src/browser/widget/inline-hint/inline-hint.controller.ts +7 -1
- package/src/browser/widget/inline-input/inline-input-widget.tsx +12 -34
- package/src/browser/widget/inline-input/inline-input.controller.ts +242 -454
- package/src/browser/widget/inline-input/inline-input.module.less +0 -4
- package/src/browser/widget/inline-input/inline-input.service.ts +13 -92
- package/src/browser/widget/inline-stream-diff/inline-stream-diff.handler.tsx +67 -58
- package/src/browser/widget/inline-stream-diff/live-preview.component.tsx +6 -49
- package/src/browser/widget/inline-stream-diff/live-preview.decoration.tsx +112 -41
- package/src/common/index.ts +0 -15
- package/src/common/types.ts +0 -22
- package/src/common/utils.ts +2 -4
- package/src/node/index.ts +0 -21
- package/lib/browser/components/ChatContext/ContextSelector.d.ts +0 -12
- package/lib/browser/components/ChatContext/ContextSelector.d.ts.map +0 -1
- package/lib/browser/components/ChatContext/ContextSelector.js +0 -113
- package/lib/browser/components/ChatContext/ContextSelector.js.map +0 -1
- package/lib/browser/components/ChatContext/index.d.ts +0 -4
- package/lib/browser/components/ChatContext/index.d.ts.map +0 -1
- package/lib/browser/components/ChatContext/index.js +0 -100
- package/lib/browser/components/ChatContext/index.js.map +0 -1
- package/lib/browser/components/ChatContext/style.module.less +0 -201
- package/lib/browser/components/ChatHistory.d.ts +0 -21
- package/lib/browser/components/ChatHistory.d.ts.map +0 -1
- package/lib/browser/components/ChatHistory.js +0 -148
- package/lib/browser/components/ChatHistory.js.map +0 -1
- package/lib/browser/components/ChatToolRender.d.ts +0 -7
- package/lib/browser/components/ChatToolRender.d.ts.map +0 -1
- package/lib/browser/components/ChatToolRender.js +0 -71
- package/lib/browser/components/ChatToolRender.js.map +0 -1
- package/lib/browser/components/ChatToolRender.module.less +0 -86
- package/lib/browser/components/chat-history.css +0 -139
- package/lib/browser/context/llm-context.contribution.d.ts +0 -7
- package/lib/browser/context/llm-context.contribution.d.ts.map +0 -1
- package/lib/browser/context/llm-context.contribution.js +0 -21
- package/lib/browser/context/llm-context.contribution.js.map +0 -1
- package/lib/browser/context/llm-context.service.d.ts +0 -36
- package/lib/browser/context/llm-context.service.d.ts.map +0 -1
- package/lib/browser/context/llm-context.service.js +0 -170
- package/lib/browser/context/llm-context.service.js.map +0 -1
- package/lib/browser/contrib/intelligent-completions/source/trigger.source.d.ts +0 -13
- package/lib/browser/contrib/intelligent-completions/source/trigger.source.d.ts.map +0 -1
- package/lib/browser/contrib/intelligent-completions/source/trigger.source.js +0 -36
- package/lib/browser/contrib/intelligent-completions/source/trigger.source.js.map +0 -1
- package/lib/browser/contrib/intelligent-completions/source/typing.source.d.ts +0 -9
- package/lib/browser/contrib/intelligent-completions/source/typing.source.d.ts.map +0 -1
- package/lib/browser/contrib/intelligent-completions/source/typing.source.js +0 -36
- package/lib/browser/contrib/intelligent-completions/source/typing.source.js.map +0 -1
- package/lib/browser/mcp/base-apply.service.d.ts +0 -67
- package/lib/browser/mcp/base-apply.service.d.ts.map +0 -1
- package/lib/browser/mcp/base-apply.service.js +0 -290
- package/lib/browser/mcp/base-apply.service.js.map +0 -1
- package/lib/browser/mcp/mcp-server-proxy.service.d.ts +0 -30
- package/lib/browser/mcp/mcp-server-proxy.service.d.ts.map +0 -1
- package/lib/browser/mcp/mcp-server-proxy.service.js +0 -57
- package/lib/browser/mcp/mcp-server-proxy.service.js.map +0 -1
- package/lib/browser/mcp/mcp-server.feature.registry.d.ts +0 -20
- package/lib/browser/mcp/mcp-server.feature.registry.d.ts.map +0 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js +0 -69
- package/lib/browser/mcp/mcp-server.feature.registry.js.map +0 -1
- package/lib/browser/mcp/mcp-tools-dialog.module.less +0 -44
- package/lib/browser/mcp/mcp-tools-dialog.view.d.ts +0 -8
- package/lib/browser/mcp/mcp-tools-dialog.view.d.ts.map +0 -1
- package/lib/browser/mcp/mcp-tools-dialog.view.js +0 -16
- package/lib/browser/mcp/mcp-tools-dialog.view.js.map +0 -1
- package/lib/browser/mcp/tools/components/EditFile.d.ts +0 -3
- package/lib/browser/mcp/tools/components/EditFile.d.ts.map +0 -1
- package/lib/browser/mcp/tools/components/EditFile.js +0 -101
- package/lib/browser/mcp/tools/components/EditFile.js.map +0 -1
- package/lib/browser/mcp/tools/components/SearchResult.d.ts +0 -11
- package/lib/browser/mcp/tools/components/SearchResult.d.ts.map +0 -1
- package/lib/browser/mcp/tools/components/SearchResult.js +0 -60
- package/lib/browser/mcp/tools/components/SearchResult.js.map +0 -1
- package/lib/browser/mcp/tools/components/Terminal.d.ts +0 -4
- package/lib/browser/mcp/tools/components/Terminal.d.ts.map +0 -1
- package/lib/browser/mcp/tools/components/Terminal.js +0 -64
- package/lib/browser/mcp/tools/components/Terminal.js.map +0 -1
- package/lib/browser/mcp/tools/components/index.module.less +0 -168
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts +0 -9
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts.map +0 -1
- package/lib/browser/mcp/tools/createNewFileWithText.js +0 -82
- package/lib/browser/mcp/tools/createNewFileWithText.js.map +0 -1
- package/lib/browser/mcp/tools/editFile.d.ts +0 -8
- package/lib/browser/mcp/tools/editFile.d.ts.map +0 -1
- package/lib/browser/mcp/tools/editFile.js +0 -95
- package/lib/browser/mcp/tools/editFile.js.map +0 -1
- package/lib/browser/mcp/tools/fileSearch.d.ts +0 -10
- package/lib/browser/mcp/tools/fileSearch.d.ts.map +0 -1
- package/lib/browser/mcp/tools/fileSearch.js +0 -94
- package/lib/browser/mcp/tools/fileSearch.js.map +0 -1
- package/lib/browser/mcp/tools/getDiagnosticsByPath.d.ts +0 -10
- package/lib/browser/mcp/tools/getDiagnosticsByPath.d.ts.map +0 -1
- package/lib/browser/mcp/tools/getDiagnosticsByPath.js +0 -118
- package/lib/browser/mcp/tools/getDiagnosticsByPath.js.map +0 -1
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.d.ts +0 -11
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.d.ts.map +0 -1
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.js +0 -118
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.js.map +0 -1
- package/lib/browser/mcp/tools/grepSearch.d.ts +0 -10
- package/lib/browser/mcp/tools/grepSearch.d.ts.map +0 -1
- package/lib/browser/mcp/tools/grepSearch.js +0 -118
- package/lib/browser/mcp/tools/grepSearch.js.map +0 -1
- package/lib/browser/mcp/tools/handlers/EditFile.d.ts +0 -10
- package/lib/browser/mcp/tools/handlers/EditFile.d.ts.map +0 -1
- package/lib/browser/mcp/tools/handlers/EditFile.js +0 -28
- package/lib/browser/mcp/tools/handlers/EditFile.js.map +0 -1
- package/lib/browser/mcp/tools/handlers/ListDir.d.ts +0 -21
- package/lib/browser/mcp/tools/handlers/ListDir.d.ts.map +0 -1
- package/lib/browser/mcp/tools/handlers/ListDir.js +0 -112
- package/lib/browser/mcp/tools/handlers/ListDir.js.map +0 -1
- package/lib/browser/mcp/tools/handlers/ReadFile.d.ts +0 -53
- package/lib/browser/mcp/tools/handlers/ReadFile.d.ts.map +0 -1
- package/lib/browser/mcp/tools/handlers/ReadFile.js +0 -161
- package/lib/browser/mcp/tools/handlers/ReadFile.js.map +0 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts +0 -43
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts.map +0 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.js +0 -104
- package/lib/browser/mcp/tools/handlers/RunCommand.js.map +0 -1
- package/lib/browser/mcp/tools/handlers/utils.d.ts +0 -2
- package/lib/browser/mcp/tools/handlers/utils.d.ts.map +0 -1
- package/lib/browser/mcp/tools/handlers/utils.js +0 -7
- package/lib/browser/mcp/tools/handlers/utils.js.map +0 -1
- package/lib/browser/mcp/tools/listDir.d.ts +0 -8
- package/lib/browser/mcp/tools/listDir.d.ts.map +0 -1
- package/lib/browser/mcp/tools/listDir.js +0 -64
- package/lib/browser/mcp/tools/listDir.js.map +0 -1
- package/lib/browser/mcp/tools/readFile.d.ts +0 -8
- package/lib/browser/mcp/tools/readFile.d.ts.map +0 -1
- package/lib/browser/mcp/tools/readFile.js +0 -81
- package/lib/browser/mcp/tools/readFile.js.map +0 -1
- package/lib/browser/mcp/tools/runTerminalCmd.d.ts +0 -13
- package/lib/browser/mcp/tools/runTerminalCmd.d.ts.map +0 -1
- package/lib/browser/mcp/tools/runTerminalCmd.js +0 -49
- package/lib/browser/mcp/tools/runTerminalCmd.js.map +0 -1
- package/lib/browser/widget/inline-input/model.d.ts +0 -34
- package/lib/browser/widget/inline-input/model.d.ts.map +0 -1
- package/lib/browser/widget/inline-input/model.js +0 -63
- package/lib/browser/widget/inline-input/model.js.map +0 -1
- package/lib/common/llm-context.d.ts +0 -40
- package/lib/common/llm-context.d.ts.map +0 -1
- package/lib/common/llm-context.js +0 -5
- package/lib/common/llm-context.js.map +0 -1
- package/lib/common/mcp-server-manager.d.ts +0 -40
- package/lib/common/mcp-server-manager.d.ts.map +0 -1
- package/lib/common/mcp-server-manager.js +0 -6
- package/lib/common/mcp-server-manager.js.map +0 -1
- package/lib/common/prompts/context-prompt-provider.d.ts +0 -14
- package/lib/common/prompts/context-prompt-provider.d.ts.map +0 -1
- package/lib/common/prompts/context-prompt-provider.js +0 -38
- package/lib/common/prompts/context-prompt-provider.js.map +0 -1
- package/lib/common/tool-invocation-registry.d.ts +0 -92
- package/lib/common/tool-invocation-registry.d.ts.map +0 -1
- package/lib/common/tool-invocation-registry.js +0 -90
- package/lib/common/tool-invocation-registry.js.map +0 -1
- package/lib/node/anthropic/anthropic-language-model.d.ts +0 -9
- package/lib/node/anthropic/anthropic-language-model.d.ts.map +0 -1
- package/lib/node/anthropic/anthropic-language-model.js +0 -26
- package/lib/node/anthropic/anthropic-language-model.js.map +0 -1
- package/lib/node/base-language-model.d.ts +0 -14
- package/lib/node/base-language-model.d.ts.map +0 -1
- package/lib/node/base-language-model.js +0 -140
- package/lib/node/base-language-model.js.map +0 -1
- package/lib/node/deepseek/deepseek-language-model.d.ts +0 -9
- package/lib/node/deepseek/deepseek-language-model.d.ts.map +0 -1
- package/lib/node/deepseek/deepseek-language-model.js +0 -26
- package/lib/node/deepseek/deepseek-language-model.js.map +0 -1
- package/lib/node/mcp/sumi-mcp-server.d.ts +0 -91
- package/lib/node/mcp/sumi-mcp-server.d.ts.map +0 -1
- package/lib/node/mcp/sumi-mcp-server.js +0 -175
- package/lib/node/mcp/sumi-mcp-server.js.map +0 -1
- package/lib/node/mcp-server-manager-impl.d.ts +0 -27
- package/lib/node/mcp-server-manager-impl.d.ts.map +0 -1
- package/lib/node/mcp-server-manager-impl.js +0 -128
- package/lib/node/mcp-server-manager-impl.js.map +0 -1
- package/lib/node/mcp-server.d.ts +0 -207
- package/lib/node/mcp-server.d.ts.map +0 -1
- package/lib/node/mcp-server.js +0 -92
- package/lib/node/mcp-server.js.map +0 -1
- package/lib/node/openai/openai-language-model.d.ts +0 -9
- package/lib/node/openai/openai-language-model.d.ts.map +0 -1
- package/lib/node/openai/openai-language-model.js +0 -29
- package/lib/node/openai/openai-language-model.js.map +0 -1
- package/src/browser/components/ChatContext/ContextSelector.tsx +0 -177
- package/src/browser/components/ChatContext/index.tsx +0 -151
- package/src/browser/components/ChatContext/style.module.less +0 -201
- package/src/browser/components/ChatHistory.tsx +0 -292
- package/src/browser/components/ChatToolRender.module.less +0 -86
- package/src/browser/components/ChatToolRender.tsx +0 -96
- package/src/browser/components/chat-history.css +0 -139
- package/src/browser/context/llm-context.contribution.ts +0 -14
- package/src/browser/context/llm-context.service.ts +0 -200
- package/src/browser/contrib/intelligent-completions/source/trigger.source.ts +0 -44
- package/src/browser/contrib/intelligent-completions/source/typing.source.ts +0 -34
- package/src/browser/mcp/base-apply.service.ts +0 -349
- package/src/browser/mcp/mcp-server-proxy.service.ts +0 -55
- package/src/browser/mcp/mcp-server.feature.registry.ts +0 -77
- package/src/browser/mcp/mcp-tools-dialog.module.less +0 -44
- package/src/browser/mcp/mcp-tools-dialog.view.tsx +0 -24
- package/src/browser/mcp/tools/components/EditFile.tsx +0 -144
- package/src/browser/mcp/tools/components/SearchResult.tsx +0 -92
- package/src/browser/mcp/tools/components/Terminal.tsx +0 -97
- package/src/browser/mcp/tools/components/index.module.less +0 -168
- package/src/browser/mcp/tools/createNewFileWithText.ts +0 -82
- package/src/browser/mcp/tools/editFile.ts +0 -100
- package/src/browser/mcp/tools/fileSearch.ts +0 -99
- package/src/browser/mcp/tools/getDiagnosticsByPath.ts +0 -122
- package/src/browser/mcp/tools/getOpenEditorFileDiagnostics.ts +0 -120
- package/src/browser/mcp/tools/grepSearch.ts +0 -121
- package/src/browser/mcp/tools/handlers/EditFile.ts +0 -21
- package/src/browser/mcp/tools/handlers/ListDir.ts +0 -117
- package/src/browser/mcp/tools/handlers/ReadFile.ts +0 -192
- package/src/browser/mcp/tools/handlers/RunCommand.ts +0 -115
- package/src/browser/mcp/tools/handlers/utils.ts +0 -3
- package/src/browser/mcp/tools/listDir.ts +0 -65
- package/src/browser/mcp/tools/readFile.ts +0 -81
- package/src/browser/mcp/tools/runTerminalCmd.ts +0 -45
- package/src/browser/widget/inline-input/model.ts +0 -74
- package/src/common/llm-context.ts +0 -47
- package/src/common/mcp-server-manager.ts +0 -51
- package/src/common/prompts/context-prompt-provider.ts +0 -46
- package/src/common/tool-invocation-registry.ts +0 -168
- package/src/node/anthropic/anthropic-language-model.ts +0 -25
- package/src/node/base-language-model.ts +0 -177
- package/src/node/deepseek/deepseek-language-model.ts +0 -25
- package/src/node/mcp/sumi-mcp-server.ts +0 -200
- package/src/node/mcp-server-manager-impl.ts +0 -156
- package/src/node/mcp-server.ts +0 -127
- package/src/node/openai/openai-language-model.ts +0 -25
package/lib/node/index.js
CHANGED
|
@@ -6,9 +6,6 @@ const di_1 = require("@opensumi/di");
|
|
|
6
6
|
const ide_core_common_1 = require("@opensumi/ide-core-common");
|
|
7
7
|
const ide_core_node_1 = require("@opensumi/ide-core-node");
|
|
8
8
|
const base_back_service_1 = require("@opensumi/ide-core-node/lib/ai-native/base-back.service");
|
|
9
|
-
const common_1 = require("../common");
|
|
10
|
-
const tool_invocation_registry_1 = require("../common/tool-invocation-registry");
|
|
11
|
-
const sumi_mcp_server_1 = require("./mcp/sumi-mcp-server");
|
|
12
9
|
let AINativeModule = class AINativeModule extends ide_core_node_1.NodeModule {
|
|
13
10
|
constructor() {
|
|
14
11
|
super(...arguments);
|
|
@@ -17,28 +14,12 @@ let AINativeModule = class AINativeModule extends ide_core_node_1.NodeModule {
|
|
|
17
14
|
token: ide_core_common_1.AIBackSerivceToken,
|
|
18
15
|
useClass: base_back_service_1.BaseAIBackService,
|
|
19
16
|
},
|
|
20
|
-
{
|
|
21
|
-
token: tool_invocation_registry_1.ToolInvocationRegistryManager,
|
|
22
|
-
useClass: tool_invocation_registry_1.ToolInvocationRegistryManagerImpl,
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
token: common_1.TokenMCPServerProxyService,
|
|
26
|
-
useClass: sumi_mcp_server_1.SumiMCPServerBackend,
|
|
27
|
-
},
|
|
28
17
|
];
|
|
29
18
|
this.backServices = [
|
|
30
19
|
{
|
|
31
20
|
servicePath: ide_core_common_1.AIBackSerivcePath,
|
|
32
21
|
token: ide_core_common_1.AIBackSerivceToken,
|
|
33
22
|
},
|
|
34
|
-
// {
|
|
35
|
-
// servicePath: MCPServerManagerPath,
|
|
36
|
-
// token: MCPServerManager,
|
|
37
|
-
// },
|
|
38
|
-
{
|
|
39
|
-
servicePath: common_1.SumiMCPServerProxyServicePath,
|
|
40
|
-
token: common_1.TokenMCPServerProxyService,
|
|
41
|
-
},
|
|
42
23
|
];
|
|
43
24
|
}
|
|
44
25
|
};
|
package/lib/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAoD;AACpD,+DAAkF;AAClF,2DAAqD;AACrD,+FAA4F;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/node/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAoD;AACpD,+DAAkF;AAClF,2DAAqD;AACrD,+FAA4F;AAGrF,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,0BAAU;IAAvC;;QACL,cAAS,GAAe;YACtB;gBACE,KAAK,EAAE,oCAAkB;gBACzB,QAAQ,EAAE,qCAAiB;aAC5B;SACF,CAAC;QAEF,iBAAY,GAAG;YACb;gBACE,WAAW,EAAE,mCAAiB;gBAC9B,KAAK,EAAE,oCAAkB;aAC1B;SACF,CAAC;IACJ,CAAC;CAAA,CAAA;AAdY,wCAAc;yBAAd,cAAc;IAD1B,IAAA,eAAU,GAAE;GACA,cAAc,CAc1B"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensumi/ide-ai-native",
|
|
3
|
-
"version": "3.7.2-next-
|
|
3
|
+
"version": "3.7.2-next-1741226843.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"lib",
|
|
6
6
|
"src"
|
|
@@ -19,45 +19,34 @@
|
|
|
19
19
|
"url": "git@github.com:opensumi/core.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@
|
|
23
|
-
"@
|
|
24
|
-
"@
|
|
25
|
-
"@
|
|
26
|
-
"@opensumi/ide-
|
|
27
|
-
"@opensumi/ide-
|
|
28
|
-
"@opensumi/ide-
|
|
29
|
-
"@opensumi/ide-
|
|
30
|
-
"@opensumi/ide-
|
|
31
|
-
"@opensumi/ide-
|
|
32
|
-
"@opensumi/ide-
|
|
33
|
-
"@opensumi/ide-
|
|
34
|
-
"@opensumi/ide-
|
|
35
|
-
"@opensumi/ide-
|
|
36
|
-
"@opensumi/ide-
|
|
37
|
-
"@opensumi/ide-
|
|
38
|
-
"@opensumi/ide-
|
|
39
|
-
"@opensumi/ide-
|
|
40
|
-
"@opensumi/ide-preferences": "3.7.2-next-1740450374.0",
|
|
41
|
-
"@opensumi/ide-search": "3.7.2-next-1740450374.0",
|
|
42
|
-
"@opensumi/ide-terminal-next": "3.7.2-next-1740450374.0",
|
|
43
|
-
"@opensumi/ide-theme": "3.7.2-next-1740450374.0",
|
|
44
|
-
"@opensumi/ide-utils": "3.7.2-next-1740450374.0",
|
|
45
|
-
"@opensumi/ide-workspace": "3.7.2-next-1740450374.0",
|
|
22
|
+
"@opensumi/ide-components": "3.7.2-next-1741226843.0",
|
|
23
|
+
"@opensumi/ide-core-common": "3.7.2-next-1741226843.0",
|
|
24
|
+
"@opensumi/ide-core-node": "3.7.2-next-1741226843.0",
|
|
25
|
+
"@opensumi/ide-debug": "3.7.2-next-1741226843.0",
|
|
26
|
+
"@opensumi/ide-design": "3.7.2-next-1741226843.0",
|
|
27
|
+
"@opensumi/ide-editor": "3.7.2-next-1741226843.0",
|
|
28
|
+
"@opensumi/ide-file-service": "3.7.2-next-1741226843.0",
|
|
29
|
+
"@opensumi/ide-file-tree-next": "3.7.2-next-1741226843.0",
|
|
30
|
+
"@opensumi/ide-main-layout": "3.7.2-next-1741226843.0",
|
|
31
|
+
"@opensumi/ide-markers": "3.7.2-next-1741226843.0",
|
|
32
|
+
"@opensumi/ide-menu-bar": "3.7.2-next-1741226843.0",
|
|
33
|
+
"@opensumi/ide-monaco": "3.7.2-next-1741226843.0",
|
|
34
|
+
"@opensumi/ide-overlay": "3.7.2-next-1741226843.0",
|
|
35
|
+
"@opensumi/ide-preferences": "3.7.2-next-1741226843.0",
|
|
36
|
+
"@opensumi/ide-terminal-next": "3.7.2-next-1741226843.0",
|
|
37
|
+
"@opensumi/ide-theme": "3.7.2-next-1741226843.0",
|
|
38
|
+
"@opensumi/ide-utils": "3.7.2-next-1741226843.0",
|
|
39
|
+
"@opensumi/ide-workspace": "3.7.2-next-1741226843.0",
|
|
46
40
|
"@xterm/xterm": "5.5.0",
|
|
47
|
-
"ai": "^4.1.21",
|
|
48
41
|
"ansi-regex": "^2.0.0",
|
|
49
|
-
"diff": "^7.0.0",
|
|
50
42
|
"dom-align": "^1.7.0",
|
|
51
|
-
"rc-collapse": "^4.0.0",
|
|
52
43
|
"react-chat-elements": "^12.0.10",
|
|
53
44
|
"react-highlight": "^0.15.0",
|
|
54
45
|
"tiktoken": "1.0.12",
|
|
55
|
-
"web-tree-sitter": "0.22.6"
|
|
56
|
-
"zod": "^3.23.8",
|
|
57
|
-
"zod-to-json-schema": "^3.24.1"
|
|
46
|
+
"web-tree-sitter": "0.22.6"
|
|
58
47
|
},
|
|
59
48
|
"devDependencies": {
|
|
60
|
-
"@opensumi/ide-core-browser": "3.7.2-next-
|
|
49
|
+
"@opensumi/ide-core-browser": "3.7.2-next-1741226843.0"
|
|
61
50
|
},
|
|
62
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "4abde3a575df8a7ce66b2977604b054f8a512af1"
|
|
63
52
|
}
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
InlineCompletionIsTrigger,
|
|
6
6
|
InlineDiffPartialEditsIsVisible,
|
|
7
7
|
InlineHintWidgetIsVisible,
|
|
8
|
-
InlineInputWidgetIsStreaming,
|
|
9
8
|
InlineInputWidgetIsVisible,
|
|
10
9
|
MultiLineEditsIsVisible,
|
|
11
10
|
} from '@opensumi/ide-core-browser/lib/contextkey/ai-native';
|
|
@@ -23,7 +22,6 @@ export class AINativeContextKey {
|
|
|
23
22
|
public readonly inlineCompletionIsTrigger: IContextKey<boolean>;
|
|
24
23
|
public readonly inlineHintWidgetIsVisible: IContextKey<boolean>;
|
|
25
24
|
public readonly inlineInputWidgetIsVisible: IContextKey<boolean>;
|
|
26
|
-
public readonly inlineInputWidgetIsStreaming: IContextKey<boolean>;
|
|
27
25
|
public readonly inlineDiffPartialEditsIsVisible: IContextKey<boolean>;
|
|
28
26
|
public readonly multiLineEditsIsVisible: IContextKey<boolean>;
|
|
29
27
|
public get contextKeyService() {
|
|
@@ -36,7 +34,6 @@ export class AINativeContextKey {
|
|
|
36
34
|
this.inlineCompletionIsTrigger = InlineCompletionIsTrigger.bind(this._contextKeyService);
|
|
37
35
|
this.inlineHintWidgetIsVisible = InlineHintWidgetIsVisible.bind(this._contextKeyService);
|
|
38
36
|
this.inlineInputWidgetIsVisible = InlineInputWidgetIsVisible.bind(this._contextKeyService);
|
|
39
|
-
this.inlineInputWidgetIsStreaming = InlineInputWidgetIsStreaming.bind(this._contextKeyService);
|
|
40
37
|
this.inlineDiffPartialEditsIsVisible = InlineDiffPartialEditsIsVisible.bind(this._contextKeyService);
|
|
41
38
|
this.multiLineEditsIsVisible = MultiLineEditsIsVisible.bind(this._contextKeyService);
|
|
42
39
|
}
|
|
@@ -27,7 +27,6 @@ import {
|
|
|
27
27
|
} from '@opensumi/ide-core-browser';
|
|
28
28
|
import {
|
|
29
29
|
AI_CHAT_VISIBLE,
|
|
30
|
-
AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL,
|
|
31
30
|
AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE,
|
|
32
31
|
AI_INLINE_CHAT_VISIBLE,
|
|
33
32
|
AI_INLINE_COMPLETION_REPORTER,
|
|
@@ -38,7 +37,6 @@ import {
|
|
|
38
37
|
InlineChatIsVisible,
|
|
39
38
|
InlineDiffPartialEditsIsVisible,
|
|
40
39
|
InlineHintWidgetIsVisible,
|
|
41
|
-
InlineInputWidgetIsStreaming,
|
|
42
40
|
InlineInputWidgetIsVisible,
|
|
43
41
|
} from '@opensumi/ide-core-browser/lib/contextkey/ai-native';
|
|
44
42
|
import { DesignLayoutConfig } from '@opensumi/ide-core-browser/lib/layout/constants';
|
|
@@ -58,9 +56,8 @@ import {
|
|
|
58
56
|
runWhenIdle,
|
|
59
57
|
} from '@opensumi/ide-core-common';
|
|
60
58
|
import { DESIGN_MENU_BAR_RIGHT } from '@opensumi/ide-design';
|
|
61
|
-
import { IEditor
|
|
59
|
+
import { IEditor } from '@opensumi/ide-editor';
|
|
62
60
|
import { BrowserEditorContribution, IEditorFeatureRegistry } from '@opensumi/ide-editor/lib/browser';
|
|
63
|
-
import { WorkbenchEditorServiceImpl } from '@opensumi/ide-editor/lib/browser/workbench-editor.service';
|
|
64
61
|
import { IMainLayoutService } from '@opensumi/ide-main-layout';
|
|
65
62
|
import { ISettingRegistry, SettingContribution } from '@opensumi/ide-preferences';
|
|
66
63
|
import { EditorContributionInstantiation } from '@opensumi/monaco-editor-core/esm/vs/editor/browser/editorExtensions';
|
|
@@ -73,16 +70,9 @@ import {
|
|
|
73
70
|
AI_CHAT_VIEW_ID,
|
|
74
71
|
AI_MENU_BAR_DEBUG_TOOLBAR,
|
|
75
72
|
ChatProxyServiceToken,
|
|
76
|
-
IChatInternalService,
|
|
77
|
-
IChatManagerService,
|
|
78
|
-
ISumiMCPServerBackend,
|
|
79
|
-
SumiMCPServerProxyServicePath,
|
|
80
73
|
} from '../common';
|
|
81
|
-
import { MCPServerDescription } from '../common/mcp-server-manager';
|
|
82
74
|
|
|
83
|
-
import { ChatManagerService } from './chat/chat-manager.service';
|
|
84
75
|
import { ChatProxyService } from './chat/chat-proxy.service';
|
|
85
|
-
import { ChatInternalService } from './chat/chat.internal.service';
|
|
86
76
|
import { AIChatView } from './chat/chat.view';
|
|
87
77
|
import { CodeActionSingleHandler } from './contrib/code-action/code-action.handler';
|
|
88
78
|
import { AIInlineCompletionsProvider } from './contrib/inline-completions/completeProvider';
|
|
@@ -104,21 +94,18 @@ import {
|
|
|
104
94
|
IChatFeatureRegistry,
|
|
105
95
|
IChatRenderRegistry,
|
|
106
96
|
IIntelligentCompletionsRegistry,
|
|
107
|
-
IMCPServerRegistry,
|
|
108
97
|
IProblemFixProviderRegistry,
|
|
109
98
|
IRenameCandidatesProviderRegistry,
|
|
110
99
|
IResolveConflictRegistry,
|
|
111
100
|
ITerminalProviderRegistry,
|
|
112
|
-
MCPServerContribution,
|
|
113
|
-
TokenMCPServerRegistry,
|
|
114
101
|
} from './types';
|
|
115
102
|
import { InlineChatEditorController } from './widget/inline-chat/inline-chat-editor.controller';
|
|
116
103
|
import { InlineChatFeatureRegistry } from './widget/inline-chat/inline-chat.feature.registry';
|
|
117
|
-
import {
|
|
104
|
+
import { AIInlineChatService } from './widget/inline-chat/inline-chat.service';
|
|
118
105
|
import { InlineDiffController } from './widget/inline-diff/inline-diff.controller';
|
|
119
106
|
import { InlineHintController } from './widget/inline-hint/inline-hint.controller';
|
|
120
107
|
import { InlineInputController } from './widget/inline-input/inline-input.controller';
|
|
121
|
-
import {
|
|
108
|
+
import { InlineInputChatService } from './widget/inline-input/inline-input.service';
|
|
122
109
|
import { InlineStreamDiffService } from './widget/inline-stream-diff/inline-stream-diff.service';
|
|
123
110
|
import { SumiLightBulbWidget } from './widget/light-bulb';
|
|
124
111
|
|
|
@@ -155,12 +142,6 @@ export class AINativeBrowserContribution
|
|
|
155
142
|
@Autowired(AINativeCoreContribution)
|
|
156
143
|
private readonly contributions: ContributionProvider<AINativeCoreContribution>;
|
|
157
144
|
|
|
158
|
-
@Autowired(MCPServerContribution)
|
|
159
|
-
private readonly mcpServerContributions: ContributionProvider<MCPServerContribution>;
|
|
160
|
-
|
|
161
|
-
@Autowired(TokenMCPServerRegistry)
|
|
162
|
-
private readonly mcpServerRegistry: IMCPServerRegistry;
|
|
163
|
-
|
|
164
145
|
@Autowired(InlineChatFeatureRegistryToken)
|
|
165
146
|
private readonly inlineChatFeatureRegistry: InlineChatFeatureRegistry;
|
|
166
147
|
|
|
@@ -210,10 +191,10 @@ export class AINativeBrowserContribution
|
|
|
210
191
|
private readonly chatProxyService: ChatProxyService;
|
|
211
192
|
|
|
212
193
|
@Autowired(IAIInlineChatService)
|
|
213
|
-
private readonly aiInlineChatService:
|
|
194
|
+
private readonly aiInlineChatService: AIInlineChatService;
|
|
214
195
|
|
|
215
|
-
@Autowired(
|
|
216
|
-
private readonly
|
|
196
|
+
@Autowired(InlineInputChatService)
|
|
197
|
+
private readonly inlineInputChatService: InlineInputChatService;
|
|
217
198
|
|
|
218
199
|
@Autowired(InlineStreamDiffService)
|
|
219
200
|
private readonly inlineStreamDiffService: InlineStreamDiffService;
|
|
@@ -224,36 +205,22 @@ export class AINativeBrowserContribution
|
|
|
224
205
|
@Autowired(CodeActionSingleHandler)
|
|
225
206
|
private readonly codeActionSingleHandler: CodeActionSingleHandler;
|
|
226
207
|
|
|
227
|
-
@Autowired(SumiMCPServerProxyServicePath)
|
|
228
|
-
private readonly sumiMCPServerBackendProxy: ISumiMCPServerBackend;
|
|
229
|
-
|
|
230
|
-
@Autowired(WorkbenchEditorService)
|
|
231
|
-
private readonly workbenchEditorService: WorkbenchEditorServiceImpl;
|
|
232
|
-
|
|
233
|
-
@Autowired(IChatManagerService)
|
|
234
|
-
private readonly chatManagerService: ChatManagerService;
|
|
235
|
-
|
|
236
|
-
@Autowired(IChatInternalService)
|
|
237
|
-
private readonly chatInternalService: ChatInternalService;
|
|
238
|
-
|
|
239
208
|
constructor() {
|
|
240
209
|
this.registerFeature();
|
|
241
210
|
}
|
|
242
211
|
|
|
243
|
-
|
|
212
|
+
initialize() {
|
|
244
213
|
const { supportsChatAssistant } = this.aiNativeConfigService.capabilities;
|
|
245
214
|
|
|
246
215
|
if (supportsChatAssistant) {
|
|
247
216
|
ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig, AI_CHAT_VIEW_ID, AI_CHAT_CONTAINER_ID);
|
|
248
217
|
ComponentRegistryImpl.addLayoutModule(this.appConfig.layoutConfig, DESIGN_MENU_BAR_RIGHT, AI_CHAT_LOGO_AVATAR_ID);
|
|
249
218
|
this.chatProxyService.registerDefaultAgent();
|
|
250
|
-
this.chatInternalService.init();
|
|
251
|
-
await this.chatManagerService.init();
|
|
252
219
|
}
|
|
253
220
|
}
|
|
254
221
|
|
|
255
222
|
registerEditorExtensionContribution(register: IEditorExtensionContribution<any[]>): void {
|
|
256
|
-
const { supportsInlineChat, supportsInlineCompletion, supportsProblemFix
|
|
223
|
+
const { supportsInlineChat, supportsInlineCompletion, supportsProblemFix } =
|
|
257
224
|
this.aiNativeConfigService.capabilities;
|
|
258
225
|
|
|
259
226
|
register(
|
|
@@ -262,18 +229,15 @@ export class AINativeBrowserContribution
|
|
|
262
229
|
EditorContributionInstantiation.Lazy,
|
|
263
230
|
);
|
|
264
231
|
|
|
265
|
-
if (supportsCodeAction) {
|
|
266
|
-
register(SumiLightBulbWidget.ID, SumiLightBulbWidget, EditorContributionInstantiation.Lazy);
|
|
267
|
-
}
|
|
268
|
-
|
|
269
232
|
if (supportsInlineChat) {
|
|
233
|
+
register(SumiLightBulbWidget.ID, SumiLightBulbWidget, EditorContributionInstantiation.Lazy);
|
|
270
234
|
register(
|
|
271
235
|
InlineChatEditorController.ID,
|
|
272
236
|
new SyncDescriptor(InlineChatEditorController, [this.injector]),
|
|
273
237
|
EditorContributionInstantiation.BeforeFirstInteraction,
|
|
274
238
|
);
|
|
275
239
|
|
|
276
|
-
if (this.
|
|
240
|
+
if (this.inlineChatFeatureRegistry.getInteractiveInputHandler()) {
|
|
277
241
|
register(
|
|
278
242
|
InlineHintController.ID,
|
|
279
243
|
new SyncDescriptor(InlineHintController, [this.injector]),
|
|
@@ -290,7 +254,7 @@ export class AINativeBrowserContribution
|
|
|
290
254
|
register(
|
|
291
255
|
IntelligentCompletionsController.ID,
|
|
292
256
|
new SyncDescriptor(IntelligentCompletionsController, [this.injector]),
|
|
293
|
-
EditorContributionInstantiation.
|
|
257
|
+
EditorContributionInstantiation.AfterFirstRender,
|
|
294
258
|
);
|
|
295
259
|
register(
|
|
296
260
|
InlineCompletionsController.ID,
|
|
@@ -309,7 +273,7 @@ export class AINativeBrowserContribution
|
|
|
309
273
|
|
|
310
274
|
onDidStart() {
|
|
311
275
|
runWhenIdle(() => {
|
|
312
|
-
const { supportsRenameSuggestions, supportsInlineChat
|
|
276
|
+
const { supportsRenameSuggestions, supportsInlineChat } = this.aiNativeConfigService.capabilities;
|
|
313
277
|
const prefChatVisibleType = this.preferenceService.getValid(AINativeSettingSectionsId.ChatVisibleType);
|
|
314
278
|
|
|
315
279
|
if (prefChatVisibleType === 'always') {
|
|
@@ -325,19 +289,6 @@ export class AINativeBrowserContribution
|
|
|
325
289
|
if (supportsInlineChat) {
|
|
326
290
|
this.codeActionSingleHandler.load();
|
|
327
291
|
}
|
|
328
|
-
|
|
329
|
-
if (supportsMCP) {
|
|
330
|
-
// 初始化内置 MCP Server
|
|
331
|
-
this.sumiMCPServerBackendProxy.initBuiltinMCPServer();
|
|
332
|
-
|
|
333
|
-
// 从 preferences 获取并初始化外部 MCP Servers
|
|
334
|
-
const mcpServers = this.preferenceService.getValid<MCPServerDescription[]>(
|
|
335
|
-
AINativeSettingSectionsId.MCPServers,
|
|
336
|
-
);
|
|
337
|
-
if (mcpServers && mcpServers.length > 0) {
|
|
338
|
-
this.sumiMCPServerBackendProxy.initExternalMCPServers(mcpServers);
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
292
|
});
|
|
342
293
|
}
|
|
343
294
|
|
|
@@ -351,12 +302,6 @@ export class AINativeBrowserContribution
|
|
|
351
302
|
contribution.registerTerminalProvider?.(this.terminalProviderRegistry);
|
|
352
303
|
contribution.registerIntelligentCompletionFeature?.(this.intelligentCompletionsRegistry);
|
|
353
304
|
contribution.registerProblemFixFeature?.(this.problemFixProviderRegistry);
|
|
354
|
-
contribution.registerChatAgentPromptProvider?.();
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
// 注册 Opensumi 框架提供的 MCP Server Tools 能力 (此时的 Opensumi 作为 MCP Server)
|
|
358
|
-
this.mcpServerContributions.getContributions().forEach((contribution) => {
|
|
359
|
-
contribution.registerMCPServer(this.mcpServerRegistry);
|
|
360
305
|
});
|
|
361
306
|
}
|
|
362
307
|
|
|
@@ -420,56 +365,6 @@ export class AINativeBrowserContribution
|
|
|
420
365
|
id: AINativeSettingSectionsId.CodeEditsLineChange,
|
|
421
366
|
localized: 'preference.ai.native.codeEdits.lineChange',
|
|
422
367
|
},
|
|
423
|
-
{
|
|
424
|
-
id: AINativeSettingSectionsId.CodeEditsTyping,
|
|
425
|
-
localized: 'preference.ai.native.codeEdits.typing',
|
|
426
|
-
},
|
|
427
|
-
{
|
|
428
|
-
id: AINativeSettingSectionsId.SystemPrompt,
|
|
429
|
-
localized: 'preference.ai.native.chat.system.prompt',
|
|
430
|
-
},
|
|
431
|
-
],
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
// Register language model API key settings
|
|
436
|
-
if (this.aiNativeConfigService.capabilities.supportsCustomLLMSettings) {
|
|
437
|
-
registry.registerSettingSection(AI_NATIVE_SETTING_GROUP_ID, {
|
|
438
|
-
title: localize('preference.ai.native.llm.apiSettings.title'),
|
|
439
|
-
preferences: [
|
|
440
|
-
{
|
|
441
|
-
id: AINativeSettingSectionsId.LLMModelSelection,
|
|
442
|
-
localized: 'preference.ai.native.llm.model.selection',
|
|
443
|
-
},
|
|
444
|
-
{
|
|
445
|
-
id: AINativeSettingSectionsId.DeepseekApiKey,
|
|
446
|
-
localized: 'preference.ai.native.deepseek.apiKey',
|
|
447
|
-
},
|
|
448
|
-
{
|
|
449
|
-
id: AINativeSettingSectionsId.AnthropicApiKey,
|
|
450
|
-
localized: 'preference.ai.native.anthropic.apiKey',
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
id: AINativeSettingSectionsId.OpenaiApiKey,
|
|
454
|
-
localized: 'preference.ai.native.openai.apiKey',
|
|
455
|
-
},
|
|
456
|
-
{
|
|
457
|
-
id: AINativeSettingSectionsId.OpenaiBaseURL,
|
|
458
|
-
localized: 'preference.ai.native.openai.baseURL',
|
|
459
|
-
},
|
|
460
|
-
],
|
|
461
|
-
});
|
|
462
|
-
}
|
|
463
|
-
|
|
464
|
-
// Register MCP server settings
|
|
465
|
-
if (this.aiNativeConfigService.capabilities.supportsMCP) {
|
|
466
|
-
registry.registerSettingSection(AI_NATIVE_SETTING_GROUP_ID, {
|
|
467
|
-
title: localize('preference.ai.native.mcp.settings.title'),
|
|
468
|
-
preferences: [
|
|
469
|
-
{
|
|
470
|
-
id: AINativeSettingSectionsId.MCPServers,
|
|
471
|
-
localized: 'preference.ai.native.mcp.servers',
|
|
472
|
-
},
|
|
473
368
|
],
|
|
474
369
|
});
|
|
475
370
|
}
|
|
@@ -519,48 +414,14 @@ export class AINativeBrowserContribution
|
|
|
519
414
|
});
|
|
520
415
|
|
|
521
416
|
commands.registerCommand(AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE, {
|
|
522
|
-
execute:
|
|
523
|
-
if (
|
|
524
|
-
this.
|
|
525
|
-
|
|
417
|
+
execute: (isVisible: boolean) => {
|
|
418
|
+
if (isVisible) {
|
|
419
|
+
this.inlineInputChatService.visible();
|
|
420
|
+
} else {
|
|
421
|
+
this.inlineInputChatService.hide();
|
|
526
422
|
}
|
|
527
423
|
|
|
528
|
-
|
|
529
|
-
this.commandService.executeCommand(AI_INLINE_CHAT_VISIBLE.id, false);
|
|
530
|
-
|
|
531
|
-
const editor = this.workbenchEditorService.currentCodeEditor;
|
|
532
|
-
if (!editor) {
|
|
533
|
-
return;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
const position = editor.monacoEditor.getPosition();
|
|
537
|
-
if (!position) {
|
|
538
|
-
return;
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
const selection = editor.monacoEditor.getSelection();
|
|
542
|
-
const isEmptyLine = position ? editor.monacoEditor.getModel()?.getLineLength(position.lineNumber) === 0 : false;
|
|
543
|
-
|
|
544
|
-
if (isEmptyLine) {
|
|
545
|
-
this.inlineInputService.visibleByPosition(position);
|
|
546
|
-
return;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
if (selection && !selection.isEmpty()) {
|
|
550
|
-
this.inlineInputService.visibleBySelection(selection);
|
|
551
|
-
return;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
this.inlineInputService.visibleByNearestCodeBlock(position, editor.monacoEditor);
|
|
555
|
-
},
|
|
556
|
-
});
|
|
557
|
-
|
|
558
|
-
commands.registerCommand(AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL, {
|
|
559
|
-
execute: () => {
|
|
560
|
-
const editor = this.workbenchEditorService.currentCodeEditor;
|
|
561
|
-
if (editor) {
|
|
562
|
-
InlineInputController.get(editor.monacoEditor)?.cancelToken();
|
|
563
|
-
}
|
|
424
|
+
this.aiInlineChatService._onInteractiveInputVisible.fire(isVisible);
|
|
564
425
|
},
|
|
565
426
|
});
|
|
566
427
|
|
|
@@ -651,12 +512,12 @@ export class AINativeBrowserContribution
|
|
|
651
512
|
when: `editorFocus && ${InlineChatIsVisible.raw}`,
|
|
652
513
|
});
|
|
653
514
|
|
|
654
|
-
if (this.
|
|
515
|
+
if (this.inlineChatFeatureRegistry.getInteractiveInputHandler()) {
|
|
655
516
|
// 当 Inline Chat (浮动组件)展示时,通过 CMD K 唤起 Inline Input
|
|
656
517
|
keybindings.registerKeybinding(
|
|
657
518
|
{
|
|
658
519
|
command: AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,
|
|
659
|
-
keybinding:
|
|
520
|
+
keybinding: 'ctrlcmd+k',
|
|
660
521
|
args: true,
|
|
661
522
|
priority: 0,
|
|
662
523
|
when: `editorFocus && (${InlineChatIsVisible.raw} || inlineSuggestionVisible)`,
|
|
@@ -671,18 +532,11 @@ export class AINativeBrowserContribution
|
|
|
671
532
|
priority: 0,
|
|
672
533
|
when: `editorFocus && ${InlineInputWidgetIsVisible.raw}`,
|
|
673
534
|
});
|
|
674
|
-
// 当 Inline Input 流式编辑时,通过 ESC 退出
|
|
675
|
-
keybindings.registerKeybinding({
|
|
676
|
-
command: AI_INLINE_CHAT_INTERACTIVE_INPUT_CANCEL.id,
|
|
677
|
-
keybinding: 'esc',
|
|
678
|
-
priority: 1,
|
|
679
|
-
when: `editorFocus && ${InlineInputWidgetIsStreaming.raw}`,
|
|
680
|
-
});
|
|
681
535
|
// 当出现 CMD K 展示信息时,通过快捷键快速唤起 Inline Input
|
|
682
536
|
keybindings.registerKeybinding(
|
|
683
537
|
{
|
|
684
538
|
command: AI_INLINE_CHAT_INTERACTIVE_INPUT_VISIBLE.id,
|
|
685
|
-
keybinding:
|
|
539
|
+
keybinding: 'ctrlcmd+k',
|
|
686
540
|
args: true,
|
|
687
541
|
priority: 0,
|
|
688
542
|
when: `editorFocus && ${InlineHintWidgetIsVisible.raw} && ${InlineChatIsVisible.not}`,
|
|
@@ -13,7 +13,6 @@ import {
|
|
|
13
13
|
ILogger,
|
|
14
14
|
toDisposable,
|
|
15
15
|
} from '@opensumi/ide-core-common';
|
|
16
|
-
import { ChatMessageRole } from '@opensumi/ide-core-common';
|
|
17
16
|
import { IChatMessage } from '@opensumi/ide-core-common/lib/types/ai-native';
|
|
18
17
|
|
|
19
18
|
import {
|
|
@@ -120,12 +119,6 @@ export class ChatAgentService extends Disposable implements IChatAgentService {
|
|
|
120
119
|
if (!data) {
|
|
121
120
|
throw new Error(`No agent with id ${id}`);
|
|
122
121
|
}
|
|
123
|
-
if (data.agent.metadata.systemPrompt) {
|
|
124
|
-
history.unshift({
|
|
125
|
-
role: ChatMessageRole.System,
|
|
126
|
-
content: data.agent.metadata.systemPrompt,
|
|
127
|
-
});
|
|
128
|
-
}
|
|
129
122
|
|
|
130
123
|
const result = await data.agent.invoke(request, progress, history, token);
|
|
131
124
|
return result;
|
|
@@ -4,41 +4,19 @@ import {
|
|
|
4
4
|
CancellationTokenSource,
|
|
5
5
|
Disposable,
|
|
6
6
|
DisposableMap,
|
|
7
|
-
Emitter,
|
|
8
7
|
IChatProgress,
|
|
9
|
-
IStorage,
|
|
10
|
-
STORAGE_NAMESPACE,
|
|
11
|
-
StorageProvider,
|
|
12
8
|
} from '@opensumi/ide-core-common';
|
|
13
|
-
import { ChatMessageRole
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
17
|
-
|
|
18
|
-
import { ChatModel, ChatRequestModel
|
|
19
|
-
|
|
20
|
-
interface ISessionModel {
|
|
21
|
-
sessionId: string;
|
|
22
|
-
history: { additional: Record<string, any>; messages: IHistoryChatMessage[] };
|
|
23
|
-
requests: {
|
|
24
|
-
requestId: string;
|
|
25
|
-
message: IChatRequestMessage;
|
|
26
|
-
response: {
|
|
27
|
-
isCanceled: boolean;
|
|
28
|
-
responseText: string;
|
|
29
|
-
responseContents: IChatProgressResponseContent[];
|
|
30
|
-
errorDetails: IChatResponseErrorDetails | undefined;
|
|
31
|
-
followups: IChatFollowup[];
|
|
32
|
-
};
|
|
33
|
-
}[];
|
|
34
|
-
}
|
|
9
|
+
import { ChatMessageRole } from '@opensumi/ide-core-common/lib/types/ai-native';
|
|
10
|
+
import { IChatMessage } from '@opensumi/ide-core-common/lib/types/ai-native';
|
|
11
|
+
|
|
12
|
+
import { IChatAgentService } from '../../common';
|
|
13
|
+
|
|
14
|
+
import { ChatModel, ChatRequestModel } from './chat-model';
|
|
35
15
|
|
|
36
16
|
@Injectable()
|
|
37
17
|
export class ChatManagerService extends Disposable {
|
|
38
18
|
#sessionModels = this.registerDispose(new DisposableMap<string, ChatModel>());
|
|
39
19
|
#pendingRequests = this.registerDispose(new DisposableMap<string, CancellationTokenSource>());
|
|
40
|
-
private storageInitEmitter = new Emitter<void>();
|
|
41
|
-
public onStorageInit = this.storageInitEmitter.event;
|
|
42
20
|
|
|
43
21
|
@Autowired(INJECTOR_TOKEN)
|
|
44
22
|
injector: Injector;
|
|
@@ -46,59 +24,12 @@ export class ChatManagerService extends Disposable {
|
|
|
46
24
|
@Autowired(IChatAgentService)
|
|
47
25
|
chatAgentService: IChatAgentService;
|
|
48
26
|
|
|
49
|
-
@Autowired(StorageProvider)
|
|
50
|
-
private storageProvider: StorageProvider;
|
|
51
|
-
|
|
52
|
-
private _chatStorage: IStorage;
|
|
53
|
-
|
|
54
|
-
protected fromJSON(data: ISessionModel[]) {
|
|
55
|
-
// TODO: 支持ApplyService恢复
|
|
56
|
-
return data.map((item) => {
|
|
57
|
-
const model = new ChatModel({
|
|
58
|
-
sessionId: item.sessionId,
|
|
59
|
-
history: new MsgHistoryManager(item.history),
|
|
60
|
-
});
|
|
61
|
-
const requests = item.requests.map(
|
|
62
|
-
(request) =>
|
|
63
|
-
new ChatRequestModel(
|
|
64
|
-
request.requestId,
|
|
65
|
-
model,
|
|
66
|
-
request.message,
|
|
67
|
-
new ChatResponseModel(request.requestId, model, request.message.agentId, {
|
|
68
|
-
responseContents: request.response.responseContents,
|
|
69
|
-
isComplete: true,
|
|
70
|
-
responseText: request.response.responseText,
|
|
71
|
-
errorDetails: request.response.errorDetails,
|
|
72
|
-
followups: request.response.followups,
|
|
73
|
-
isCanceled: request.response.isCanceled,
|
|
74
|
-
}),
|
|
75
|
-
),
|
|
76
|
-
);
|
|
77
|
-
model.restoreRequests(requests);
|
|
78
|
-
return model;
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
|
|
82
27
|
constructor() {
|
|
83
28
|
super();
|
|
84
29
|
}
|
|
85
30
|
|
|
86
|
-
async init() {
|
|
87
|
-
this._chatStorage = await this.storageProvider(STORAGE_NAMESPACE.CHAT);
|
|
88
|
-
const sessionsModelData = this._chatStorage.get<ISessionModel[]>('sessionModels', []);
|
|
89
|
-
const savedSessions = this.fromJSON(sessionsModelData);
|
|
90
|
-
savedSessions.forEach((session) => {
|
|
91
|
-
this.#sessionModels.set(session.sessionId, session);
|
|
92
|
-
});
|
|
93
|
-
await this.storageInitEmitter.fireAndAwait();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
getSessions() {
|
|
97
|
-
return Array.from(this.#sessionModels.values());
|
|
98
|
-
}
|
|
99
|
-
|
|
100
31
|
startSession() {
|
|
101
|
-
const model =
|
|
32
|
+
const model = this.injector.get(ChatModel);
|
|
102
33
|
this.#sessionModels.set(model.sessionId, model);
|
|
103
34
|
return model;
|
|
104
35
|
}
|
|
@@ -115,7 +46,6 @@ export class ChatManagerService extends Disposable {
|
|
|
115
46
|
this.#sessionModels.disposeKey(sessionId);
|
|
116
47
|
this.#pendingRequests.get(sessionId)?.cancel();
|
|
117
48
|
this.#pendingRequests.disposeKey(sessionId);
|
|
118
|
-
this.saveSessions();
|
|
119
49
|
}
|
|
120
50
|
|
|
121
51
|
createRequest(sessionId: string, message: string, agentId: string, command?: string) {
|
|
@@ -192,17 +122,11 @@ export class ChatManagerService extends Disposable {
|
|
|
192
122
|
} finally {
|
|
193
123
|
listener.dispose();
|
|
194
124
|
this.#pendingRequests.disposeKey(model.sessionId);
|
|
195
|
-
this.saveSessions();
|
|
196
125
|
}
|
|
197
126
|
}
|
|
198
127
|
|
|
199
|
-
protected saveSessions() {
|
|
200
|
-
this._chatStorage.set('sessionModels', this.getSessions());
|
|
201
|
-
}
|
|
202
|
-
|
|
203
128
|
cancelRequest(sessionId: string) {
|
|
204
129
|
this.#pendingRequests.get(sessionId)?.cancel();
|
|
205
130
|
this.#pendingRequests.disposeKey(sessionId);
|
|
206
|
-
this.saveSessions();
|
|
207
131
|
}
|
|
208
132
|
}
|