@opensumi/ide-ai-native 3.8.1-next-1741250387.0 → 3.8.1-next-1741251026.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 +1 -1
- package/lib/browser/ai-core.contextkeys.d.ts.map +1 -1
- package/lib/browser/ai-core.contextkeys.js +1 -1
- package/lib/browser/ai-core.contextkeys.js.map +1 -1
- package/lib/browser/ai-core.contribution.d.ts +5 -0
- package/lib/browser/ai-core.contribution.d.ts.map +1 -1
- package/lib/browser/ai-core.contribution.js +71 -9
- package/lib/browser/ai-core.contribution.js.map +1 -1
- package/lib/browser/chat/chat-agent.service.d.ts +11 -3
- package/lib/browser/chat/chat-agent.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-agent.service.js +43 -5
- package/lib/browser/chat/chat-agent.service.js.map +1 -1
- package/lib/browser/chat/chat-manager.service.d.ts +1 -0
- package/lib/browser/chat/chat-manager.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-manager.service.js +6 -8
- package/lib/browser/chat/chat-manager.service.js.map +1 -1
- package/lib/browser/chat/chat-model.d.ts +4 -1
- package/lib/browser/chat/chat-model.d.ts.map +1 -1
- package/lib/browser/chat/chat-model.js +57 -2
- package/lib/browser/chat/chat-model.js.map +1 -1
- package/lib/browser/chat/chat-proxy.service.d.ts.map +1 -1
- package/lib/browser/chat/chat-proxy.service.js +13 -6
- package/lib/browser/chat/chat-proxy.service.js.map +1 -1
- package/lib/browser/chat/chat.api.service.d.ts +1 -2
- package/lib/browser/chat/chat.api.service.d.ts.map +1 -1
- package/lib/browser/chat/chat.api.service.js +0 -4
- package/lib/browser/chat/chat.api.service.js.map +1 -1
- package/lib/browser/chat/chat.internal.service.d.ts +2 -0
- package/lib/browser/chat/chat.internal.service.d.ts.map +1 -1
- package/lib/browser/chat/chat.internal.service.js +3 -0
- package/lib/browser/chat/chat.internal.service.js.map +1 -1
- package/lib/browser/chat/chat.module.less +1 -2
- package/lib/browser/chat/chat.view.d.ts.map +1 -1
- package/lib/browser/chat/chat.view.js +46 -29
- package/lib/browser/chat/chat.view.js.map +1 -1
- package/lib/browser/components/ChatContext/index.js +2 -2
- package/lib/browser/components/ChatContext/index.js.map +1 -1
- package/lib/browser/components/ChatInput.d.ts.map +1 -1
- package/lib/browser/components/ChatInput.js +29 -1
- package/lib/browser/components/ChatInput.js.map +1 -1
- package/lib/browser/components/ChatReply.js +6 -1
- package/lib/browser/components/ChatReply.js.map +1 -1
- package/lib/browser/components/ChatThinking.d.ts +0 -2
- package/lib/browser/components/ChatThinking.d.ts.map +1 -1
- package/lib/browser/components/ChatThinking.js +2 -10
- package/lib/browser/components/ChatThinking.js.map +1 -1
- package/lib/browser/components/ChatToolRender.d.ts.map +1 -1
- package/lib/browser/components/ChatToolRender.js +2 -3
- package/lib/browser/components/ChatToolRender.js.map +1 -1
- package/lib/browser/components/WelcomeMsg.js +1 -1
- package/lib/browser/components/WelcomeMsg.js.map +1 -1
- package/lib/browser/components/chat-history.module.less +2 -1
- package/lib/browser/components/components.module.less +22 -0
- package/lib/browser/context/llm-context.service.d.ts +18 -5
- package/lib/browser/context/llm-context.service.d.ts.map +1 -1
- package/lib/browser/context/llm-context.service.js +80 -47
- package/lib/browser/context/llm-context.service.js.map +1 -1
- package/lib/browser/contrib/inline-completions/inline-completions.controller.js +1 -1
- package/lib/browser/contrib/inline-completions/inline-completions.controller.js.map +1 -1
- package/lib/browser/contrib/inline-completions/prompt/matcher.js +2 -2
- package/lib/browser/contrib/inline-completions/prompt/similarSnippets.d.ts +1 -1
- package/lib/browser/contrib/inline-completions/prompt/similarSnippets.js +2 -2
- package/lib/browser/contrib/intelligent-completions/index.d.ts +2 -1
- package/lib/browser/contrib/intelligent-completions/index.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/index.js +4 -1
- package/lib/browser/contrib/intelligent-completions/index.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.js +2 -2
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.contribution.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.js +6 -5
- package/lib/browser/contrib/intelligent-completions/intelligent-completions.controller.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/view/code-edits-previewer.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/view/code-edits-previewer.js +4 -2
- package/lib/browser/contrib/intelligent-completions/view/code-edits-previewer.js.map +1 -1
- package/lib/browser/contrib/intelligent-completions/view/default.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/view/default.js +23 -11
- package/lib/browser/contrib/intelligent-completions/view/default.js.map +1 -1
- package/lib/browser/index.d.ts.map +1 -1
- package/lib/browser/index.js +4 -0
- package/lib/browser/index.js.map +1 -1
- package/lib/browser/layout/layout.module.less +4 -4
- package/lib/browser/mcp/base-apply.service.d.ts +26 -11
- package/lib/browser/mcp/base-apply.service.d.ts.map +1 -1
- package/lib/browser/mcp/base-apply.service.js +255 -103
- package/lib/browser/mcp/base-apply.service.js.map +1 -1
- package/lib/browser/mcp/config/components/mcp-config.module.less +178 -0
- package/lib/browser/mcp/config/components/mcp-config.view.d.ts +3 -0
- package/lib/browser/mcp/config/components/mcp-config.view.d.ts.map +1 -0
- package/lib/browser/mcp/config/components/mcp-config.view.js +150 -0
- package/lib/browser/mcp/config/components/mcp-config.view.js.map +1 -0
- package/lib/browser/mcp/config/components/mcp-server-form.d.ts +16 -0
- package/lib/browser/mcp/config/components/mcp-server-form.d.ts.map +1 -0
- package/lib/browser/mcp/config/components/mcp-server-form.js +84 -0
- package/lib/browser/mcp/config/components/mcp-server-form.js.map +1 -0
- package/lib/browser/mcp/config/components/mcp-server-form.module.less +78 -0
- package/lib/browser/mcp/config/mcp-config.commands.d.ts +10 -0
- package/lib/browser/mcp/config/mcp-config.commands.d.ts.map +1 -0
- package/lib/browser/mcp/config/mcp-config.commands.js +35 -0
- package/lib/browser/mcp/config/mcp-config.commands.js.map +1 -0
- package/lib/browser/mcp/config/mcp-config.contribution.d.ts +16 -0
- package/lib/browser/mcp/config/mcp-config.contribution.d.ts.map +1 -0
- package/lib/browser/mcp/config/mcp-config.contribution.js +62 -0
- package/lib/browser/mcp/config/mcp-config.contribution.js.map +1 -0
- package/lib/browser/mcp/mcp-server-proxy.service.d.ts +6 -0
- package/lib/browser/mcp/mcp-server-proxy.service.d.ts.map +1 -1
- package/lib/browser/mcp/mcp-server-proxy.service.js +10 -1
- package/lib/browser/mcp/mcp-server-proxy.service.js.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.d.ts +8 -0
- package/lib/browser/mcp/mcp-server.feature.registry.d.ts.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js +28 -3
- package/lib/browser/mcp/mcp-server.feature.registry.js.map +1 -1
- package/lib/browser/mcp/tools/components/EditFile.d.ts.map +1 -1
- package/lib/browser/mcp/tools/components/EditFile.js +15 -9
- package/lib/browser/mcp/tools/components/EditFile.js.map +1 -1
- package/lib/browser/mcp/tools/components/ExpandableFileList.d.ts +13 -0
- package/lib/browser/mcp/tools/components/ExpandableFileList.d.ts.map +1 -0
- package/lib/browser/mcp/tools/components/{SearchResult.js → ExpandableFileList.js} +29 -19
- package/lib/browser/mcp/tools/components/ExpandableFileList.js.map +1 -0
- package/lib/browser/mcp/tools/components/Terminal.d.ts.map +1 -1
- package/lib/browser/mcp/tools/components/Terminal.js +10 -2
- package/lib/browser/mcp/tools/components/Terminal.js.map +1 -1
- package/lib/browser/mcp/tools/components/index.module.less +4 -0
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts +1 -0
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts.map +1 -1
- package/lib/browser/mcp/tools/createNewFileWithText.js +19 -11
- package/lib/browser/mcp/tools/createNewFileWithText.js.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.d.ts +1 -0
- package/lib/browser/mcp/tools/fileSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.js +14 -5
- package/lib/browser/mcp/tools/fileSearch.js.map +1 -1
- package/lib/browser/mcp/tools/getDiagnosticsByPath.d.ts.map +1 -1
- package/lib/browser/mcp/tools/getDiagnosticsByPath.js +1 -0
- package/lib/browser/mcp/tools/getDiagnosticsByPath.js.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.js +6 -3
- package/lib/browser/mcp/tools/grepSearch.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/EditFile.js +1 -1
- package/lib/browser/mcp/tools/handlers/EditFile.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/ListDir.d.ts +1 -0
- package/lib/browser/mcp/tools/handlers/ListDir.d.ts.map +1 -1
- package/lib/browser/mcp/tools/handlers/ListDir.js +3 -0
- package/lib/browser/mcp/tools/handlers/ListDir.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts.map +1 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.js +2 -0
- package/lib/browser/mcp/tools/handlers/RunCommand.js.map +1 -1
- package/lib/browser/mcp/tools/listDir.d.ts +1 -0
- package/lib/browser/mcp/tools/listDir.d.ts.map +1 -1
- package/lib/browser/mcp/tools/listDir.js +35 -4
- package/lib/browser/mcp/tools/listDir.js.map +1 -1
- package/lib/browser/mcp/tools/runTerminalCmd.d.ts.map +1 -1
- package/lib/browser/mcp/tools/runTerminalCmd.js +1 -0
- package/lib/browser/mcp/tools/runTerminalCmd.js.map +1 -1
- package/lib/browser/model/msg-history-manager.d.ts +2 -2
- package/lib/browser/model/msg-history-manager.d.ts.map +1 -1
- package/lib/browser/model/msg-history-manager.js +4 -10
- package/lib/browser/model/msg-history-manager.js.map +1 -1
- package/lib/browser/preferences/schema.d.ts.map +1 -1
- package/lib/browser/preferences/schema.js +22 -2
- package/lib/browser/preferences/schema.js.map +1 -1
- package/lib/browser/types.d.ts +4 -0
- package/lib/browser/types.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat-controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-chat/inline-chat-controller.js +6 -1
- package/lib/browser/widget/inline-chat/inline-chat-controller.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-manager.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-manager.js +68 -8
- package/lib/browser/widget/inline-diff/inline-diff-manager.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-previewer.d.ts +10 -4
- package/lib/browser/widget/inline-diff/inline-diff-previewer.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-previewer.js +14 -3
- package/lib/browser/widget/inline-diff/inline-diff-previewer.js.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff-widget.module.less +25 -4
- package/lib/browser/widget/inline-diff/inline-diff.controller.d.ts +3 -3
- package/lib/browser/widget/inline-diff/inline-diff.controller.d.ts.map +1 -1
- package/lib/browser/widget/inline-diff/inline-diff.controller.js +10 -5
- package/lib/browser/widget/inline-diff/inline-diff.controller.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.d.ts +46 -17
- 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 +110 -53
- package/lib/browser/widget/inline-stream-diff/inline-stream-diff.handler.js.map +1 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.d.ts +4 -0
- 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 +26 -1
- package/lib/browser/widget/inline-stream-diff/live-preview.decoration.js.map +1 -1
- package/lib/common/index.d.ts +13 -4
- package/lib/common/index.d.ts.map +1 -1
- package/lib/common/index.js +5 -1
- package/lib/common/index.js.map +1 -1
- package/lib/common/llm-context.d.ts +13 -9
- package/lib/common/llm-context.d.ts.map +1 -1
- package/lib/common/llm-context.js.map +1 -1
- package/lib/common/mcp-server-manager.d.ts +17 -1
- package/lib/common/mcp-server-manager.d.ts.map +1 -1
- package/lib/common/mcp-server-manager.js.map +1 -1
- package/lib/common/model.d.ts +12 -0
- package/lib/common/model.d.ts.map +1 -0
- package/lib/common/model.js +83 -0
- package/lib/common/model.js.map +1 -0
- package/lib/common/prompts/context-prompt-provider.d.ts +4 -3
- package/lib/common/prompts/context-prompt-provider.d.ts.map +1 -1
- package/lib/common/prompts/context-prompt-provider.js +33 -22
- package/lib/common/prompts/context-prompt-provider.js.map +1 -1
- package/lib/common/tool-invocation-registry.d.ts +2 -2
- package/lib/common/tool-invocation-registry.d.ts.map +1 -1
- package/lib/common/tool-invocation-registry.js +1 -1
- package/lib/common/tool-invocation-registry.js.map +1 -1
- package/lib/common/types.d.ts +8 -0
- package/lib/common/types.d.ts.map +1 -1
- package/lib/common/utils.d.ts.map +1 -1
- package/lib/common/utils.js +2 -1
- package/lib/common/utils.js.map +1 -1
- package/lib/node/anthropic/anthropic-language-model.d.ts +3 -1
- package/lib/node/anthropic/anthropic-language-model.d.ts.map +1 -1
- package/lib/node/anthropic/anthropic-language-model.js +6 -2
- package/lib/node/anthropic/anthropic-language-model.js.map +1 -1
- package/lib/node/base-language-model.d.ts +6 -3
- package/lib/node/base-language-model.d.ts.map +1 -1
- package/lib/node/base-language-model.js +14 -31
- package/lib/node/base-language-model.js.map +1 -1
- package/lib/node/deepseek/deepseek-language-model.d.ts +3 -1
- package/lib/node/deepseek/deepseek-language-model.d.ts.map +1 -1
- package/lib/node/deepseek/deepseek-language-model.js +6 -2
- package/lib/node/deepseek/deepseek-language-model.js.map +1 -1
- package/lib/node/mcp/sumi-mcp-server.d.ts +17 -3
- package/lib/node/mcp/sumi-mcp-server.d.ts.map +1 -1
- package/lib/node/mcp/sumi-mcp-server.js +59 -6
- package/lib/node/mcp/sumi-mcp-server.js.map +1 -1
- package/lib/node/mcp-server-manager-impl.d.ts +4 -3
- package/lib/node/mcp-server-manager-impl.d.ts.map +1 -1
- package/lib/node/mcp-server-manager-impl.js +26 -6
- package/lib/node/mcp-server-manager-impl.js.map +1 -1
- package/lib/node/mcp-server.d.ts +5 -16
- package/lib/node/mcp-server.d.ts.map +1 -1
- package/lib/node/mcp-server.js +12 -6
- package/lib/node/mcp-server.js.map +1 -1
- package/lib/node/openai/openai-language-model.d.ts +4 -2
- package/lib/node/openai/openai-language-model.d.ts.map +1 -1
- package/lib/node/openai/openai-language-model.js +6 -4
- package/lib/node/openai/openai-language-model.js.map +1 -1
- package/lib/node/openai-compatible/openai-compatible-language-model.d.ts +10 -0
- package/lib/node/openai-compatible/openai-compatible-language-model.d.ts.map +1 -0
- package/lib/node/openai-compatible/openai-compatible-language-model.js +32 -0
- package/lib/node/openai-compatible/openai-compatible-language-model.js.map +1 -0
- package/package.json +27 -26
- package/src/browser/ai-core.contextkeys.ts +3 -3
- package/src/browser/ai-core.contribution.ts +89 -12
- package/src/browser/chat/chat-agent.service.ts +53 -9
- package/src/browser/chat/chat-manager.service.ts +10 -8
- package/src/browser/chat/chat-model.ts +63 -5
- package/src/browser/chat/chat-proxy.service.ts +16 -8
- package/src/browser/chat/chat.api.service.ts +1 -5
- package/src/browser/chat/chat.internal.service.ts +4 -0
- package/src/browser/chat/chat.module.less +1 -2
- package/src/browser/chat/chat.view.tsx +63 -69
- package/src/browser/components/ChatContext/index.tsx +2 -2
- package/src/browser/components/ChatInput.tsx +81 -6
- package/src/browser/components/ChatReply.tsx +6 -6
- package/src/browser/components/ChatThinking.tsx +3 -9
- package/src/browser/components/ChatToolRender.tsx +1 -2
- package/src/browser/components/WelcomeMsg.tsx +1 -1
- package/src/browser/components/chat-history.module.less +2 -1
- package/src/browser/components/components.module.less +22 -0
- package/src/browser/context/llm-context.service.ts +93 -54
- package/src/browser/contrib/inline-completions/inline-completions.controller.ts +1 -1
- package/src/browser/contrib/inline-completions/prompt/matcher.ts +2 -2
- package/src/browser/contrib/inline-completions/prompt/similarSnippets.ts +2 -2
- package/src/browser/contrib/intelligent-completions/index.ts +5 -1
- package/src/browser/contrib/intelligent-completions/intelligent-completions.contribution.ts +3 -3
- package/src/browser/contrib/intelligent-completions/intelligent-completions.controller.ts +7 -6
- package/src/browser/contrib/intelligent-completions/view/code-edits-previewer.ts +4 -2
- package/src/browser/contrib/intelligent-completions/view/default.ts +34 -19
- package/src/browser/index.ts +4 -0
- package/src/browser/layout/layout.module.less +4 -4
- package/src/browser/mcp/base-apply.service.ts +306 -109
- package/src/browser/mcp/config/components/mcp-config.module.less +178 -0
- package/src/browser/mcp/config/components/mcp-config.view.tsx +215 -0
- package/src/browser/mcp/config/components/mcp-server-form.module.less +78 -0
- package/src/browser/mcp/config/components/mcp-server-form.tsx +144 -0
- package/src/browser/mcp/config/mcp-config.commands.ts +29 -0
- package/src/browser/mcp/config/mcp-config.contribution.ts +65 -0
- package/src/browser/mcp/mcp-server-proxy.service.ts +14 -2
- package/src/browser/mcp/mcp-server.feature.registry.ts +35 -4
- package/src/browser/mcp/tools/components/EditFile.tsx +16 -9
- package/src/browser/mcp/tools/components/ExpandableFileList.tsx +133 -0
- package/src/browser/mcp/tools/components/Terminal.tsx +13 -2
- package/src/browser/mcp/tools/components/index.module.less +4 -0
- package/src/browser/mcp/tools/createNewFileWithText.ts +21 -12
- package/src/browser/mcp/tools/fileSearch.ts +14 -4
- package/src/browser/mcp/tools/getDiagnosticsByPath.ts +1 -0
- package/src/browser/mcp/tools/grepSearch.ts +6 -3
- package/src/browser/mcp/tools/handlers/EditFile.ts +1 -1
- package/src/browser/mcp/tools/handlers/ListDir.ts +4 -0
- package/src/browser/mcp/tools/handlers/RunCommand.ts +2 -0
- package/src/browser/mcp/tools/listDir.ts +36 -5
- package/src/browser/mcp/tools/runTerminalCmd.ts +1 -0
- package/src/browser/model/msg-history-manager.ts +5 -11
- package/src/browser/preferences/schema.ts +22 -2
- package/src/browser/types.ts +1 -0
- package/src/browser/widget/inline-chat/inline-chat-controller.ts +5 -1
- package/src/browser/widget/inline-diff/inline-diff-manager.tsx +143 -21
- package/src/browser/widget/inline-diff/inline-diff-previewer.ts +25 -7
- package/src/browser/widget/inline-diff/inline-diff-widget.module.less +25 -4
- package/src/browser/widget/inline-diff/inline-diff.controller.ts +16 -8
- package/src/browser/widget/inline-stream-diff/inline-stream-diff.handler.tsx +139 -68
- package/src/browser/widget/inline-stream-diff/live-preview.decoration.tsx +30 -1
- package/src/common/index.ts +15 -4
- package/src/common/llm-context.ts +10 -4
- package/src/common/mcp-server-manager.ts +17 -1
- package/src/common/model.ts +90 -0
- package/src/common/prompts/context-prompt-provider.ts +38 -29
- package/src/common/tool-invocation-registry.ts +2 -2
- package/src/common/types.ts +8 -0
- package/src/common/utils.ts +3 -1
- package/src/node/anthropic/anthropic-language-model.ts +7 -2
- package/src/node/base-language-model.ts +25 -38
- package/src/node/deepseek/deepseek-language-model.ts +7 -2
- package/src/node/mcp/sumi-mcp-server.ts +67 -9
- package/src/node/mcp-server-manager-impl.ts +30 -9
- package/src/node/mcp-server.ts +11 -14
- package/src/node/openai/openai-language-model.ts +8 -4
- package/src/node/openai-compatible/openai-compatible-language-model.ts +30 -0
- 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.map +0 -1
- package/src/browser/mcp/tools/components/SearchResult.tsx +0 -92
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import { EditorSelectionChangeEvent } from '@opensumi/ide-editor/lib/browser/types';
|
|
13
13
|
import { IMarkerService } from '@opensumi/ide-markers/lib/common/types';
|
|
14
14
|
|
|
15
|
-
import { FileContext, LLMContextService, SerializedContext } from '../../common/llm-context';
|
|
15
|
+
import { AttachFileContext, FileContext, LLMContextService, SerializedContext } from '../../common/llm-context';
|
|
16
16
|
|
|
17
17
|
@Injectable()
|
|
18
18
|
export class LLMContextServiceImpl extends WithEventBus implements LLMContextService {
|
|
@@ -27,40 +27,68 @@ export class LLMContextServiceImpl extends WithEventBus implements LLMContextSer
|
|
|
27
27
|
|
|
28
28
|
private isAutoCollecting = false;
|
|
29
29
|
|
|
30
|
-
private
|
|
30
|
+
private contextVersion = 0;
|
|
31
31
|
|
|
32
|
-
private
|
|
33
|
-
|
|
34
|
-
private
|
|
32
|
+
private readonly maxAttachFilesLimit = 10;
|
|
33
|
+
private readonly maxViewFilesLimit = 20;
|
|
34
|
+
private readonly attachedFiles: FileContext[] = [];
|
|
35
|
+
private readonly recentlyViewFiles: FileContext[] = [];
|
|
36
|
+
private readonly onDidContextFilesChangeEmitter = new Emitter<{ viewed: FileContext[]; attached: FileContext[]; version: number }>();
|
|
35
37
|
onDidContextFilesChangeEvent = this.onDidContextFilesChangeEmitter.event;
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
private addFileToList(file: FileContext, list: FileContext[], maxLimit: number) {
|
|
40
|
+
const existingIndex = list.findIndex((f) => f.uri.toString() === file.uri.toString());
|
|
41
|
+
if (existingIndex > -1) {
|
|
42
|
+
list.splice(existingIndex, 1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
list.push(file);
|
|
46
|
+
if (list.length > maxLimit) {
|
|
47
|
+
list.shift();
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
addFileToContext(uri: URI, selection?: [number, number], isManual = false): void {
|
|
52
|
+
if (!uri) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
39
55
|
|
|
40
|
-
|
|
56
|
+
const file = { uri, selection };
|
|
57
|
+
const targetList = isManual ? this.attachedFiles : this.recentlyViewFiles;
|
|
58
|
+
const maxLimit = isManual ? this.maxAttachFilesLimit : this.maxViewFilesLimit;
|
|
41
59
|
|
|
42
|
-
if (
|
|
43
|
-
this.
|
|
60
|
+
if (isManual) {
|
|
61
|
+
this.docModelManager.createModelReference(uri);
|
|
44
62
|
}
|
|
45
63
|
|
|
64
|
+
this.addFileToList(file, targetList, maxLimit);
|
|
65
|
+
this.notifyContextChange();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
private notifyContextChange(): void {
|
|
46
69
|
this.onDidContextFilesChangeEmitter.fire(this.getAllContextFiles());
|
|
47
70
|
}
|
|
48
71
|
|
|
49
72
|
cleanFileContext() {
|
|
50
|
-
this.
|
|
51
|
-
this.
|
|
73
|
+
this.attachedFiles.length = 0;
|
|
74
|
+
this.notifyContextChange();
|
|
52
75
|
}
|
|
53
76
|
|
|
54
77
|
private getAllContextFiles() {
|
|
55
|
-
return
|
|
78
|
+
return {
|
|
79
|
+
viewed: this.recentlyViewFiles,
|
|
80
|
+
attached: this.attachedFiles,
|
|
81
|
+
version: this.contextVersion++,
|
|
82
|
+
};
|
|
56
83
|
}
|
|
57
84
|
|
|
58
|
-
removeFileFromContext(uri: URI): void {
|
|
59
|
-
const
|
|
85
|
+
removeFileFromContext(uri: URI, isManual = false): void {
|
|
86
|
+
const targetList = isManual ? this.attachedFiles : this.recentlyViewFiles;
|
|
87
|
+
const index = targetList.findIndex((file) => file.uri.toString() === uri.toString());
|
|
60
88
|
if (index > -1) {
|
|
61
|
-
|
|
62
|
-
this.onDidContextFilesChangeEmitter.fire(this.getAllContextFiles());
|
|
89
|
+
targetList.splice(index, 1);
|
|
63
90
|
}
|
|
91
|
+
this.notifyContextChange();
|
|
64
92
|
}
|
|
65
93
|
|
|
66
94
|
startAutoCollection(): void {
|
|
@@ -78,8 +106,7 @@ export class LLMContextServiceImpl extends WithEventBus implements LLMContextSer
|
|
|
78
106
|
if (event.payload.uri.scheme !== 'file') {
|
|
79
107
|
return;
|
|
80
108
|
}
|
|
81
|
-
|
|
82
|
-
// this.addFileToContext(event.payload.uri);
|
|
109
|
+
this.addFileToContext(event.payload.uri, undefined, false);
|
|
83
110
|
}),
|
|
84
111
|
);
|
|
85
112
|
|
|
@@ -88,6 +115,8 @@ export class LLMContextServiceImpl extends WithEventBus implements LLMContextSer
|
|
|
88
115
|
if (event.payload.scheme !== 'file') {
|
|
89
116
|
return;
|
|
90
117
|
}
|
|
118
|
+
|
|
119
|
+
this.removeFileFromContext(event.payload, false);
|
|
91
120
|
}),
|
|
92
121
|
);
|
|
93
122
|
|
|
@@ -109,11 +138,12 @@ export class LLMContextServiceImpl extends WithEventBus implements LLMContextSer
|
|
|
109
138
|
].sort() as [number, number];
|
|
110
139
|
|
|
111
140
|
if (selection[0] === selection[1]) {
|
|
112
|
-
this.addFileToContext(event.payload.editorUri, undefined);
|
|
141
|
+
this.addFileToContext(event.payload.editorUri, undefined, false);
|
|
113
142
|
} else {
|
|
114
143
|
this.addFileToContext(
|
|
115
144
|
event.payload.editorUri,
|
|
116
145
|
selection.sort((a, b) => a - b),
|
|
146
|
+
false,
|
|
117
147
|
);
|
|
118
148
|
}
|
|
119
149
|
}
|
|
@@ -127,42 +157,51 @@ export class LLMContextServiceImpl extends WithEventBus implements LLMContextSer
|
|
|
127
157
|
|
|
128
158
|
serialize(): SerializedContext {
|
|
129
159
|
const files = this.getAllContextFiles();
|
|
130
|
-
const
|
|
131
|
-
.filter((v) => !v.selection)
|
|
132
|
-
.map((file) => {
|
|
133
|
-
const relativePath = URI.file(this.appConfig.workspaceDir).relative(file.uri);
|
|
134
|
-
if (relativePath) {
|
|
135
|
-
return relativePath.toString();
|
|
136
|
-
}
|
|
137
|
-
return file.uri.parent.toString();
|
|
138
|
-
})
|
|
139
|
-
.filter(Boolean);
|
|
140
|
-
|
|
141
|
-
const attachedFiles = files
|
|
142
|
-
.filter((v) => v.selection)
|
|
143
|
-
.map((file) => {
|
|
144
|
-
const ref = this.docModelManager.getModelReference(file.uri);
|
|
145
|
-
const content = ref!.instance.getText();
|
|
146
|
-
const lineErrors = this.markerService
|
|
147
|
-
.getManager()
|
|
148
|
-
.getMarkers({
|
|
149
|
-
resource: file.uri.toString(),
|
|
150
|
-
severities: MarkerSeverity.Error,
|
|
151
|
-
})
|
|
152
|
-
.map((marker) => marker.message);
|
|
153
|
-
|
|
154
|
-
return {
|
|
155
|
-
content,
|
|
156
|
-
lineErrors,
|
|
157
|
-
path: URI.file(this.appConfig.workspaceDir).relative(file.uri)!.toString(),
|
|
158
|
-
language: ref?.instance.languageId!,
|
|
159
|
-
};
|
|
160
|
-
})
|
|
161
|
-
.filter(Boolean);
|
|
160
|
+
const workspaceRoot = URI.file(this.appConfig.workspaceDir);
|
|
162
161
|
|
|
163
162
|
return {
|
|
164
|
-
recentlyViewFiles,
|
|
165
|
-
attachedFiles,
|
|
163
|
+
recentlyViewFiles: this.serializeRecentlyViewFiles(files.viewed, workspaceRoot),
|
|
164
|
+
attachedFiles: this.serializeAttachedFiles(files.attached, workspaceRoot),
|
|
166
165
|
};
|
|
167
166
|
}
|
|
167
|
+
|
|
168
|
+
private serializeRecentlyViewFiles(files: FileContext[], workspaceRoot: URI): string[] {
|
|
169
|
+
return files
|
|
170
|
+
.map((file) => workspaceRoot.relative(file.uri)?.toString() || file.uri.parent.toString())
|
|
171
|
+
.filter(Boolean);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
private serializeAttachedFiles(files: FileContext[], workspaceRoot: URI): AttachFileContext[] {
|
|
175
|
+
return files
|
|
176
|
+
.map((file) => this.serializeAttachedFile(file, workspaceRoot))
|
|
177
|
+
.filter(Boolean) as unknown as AttachFileContext[];
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
private serializeAttachedFile(file: FileContext, workspaceRoot: URI) {
|
|
181
|
+
try {
|
|
182
|
+
const ref = this.docModelManager.getModelReference(file.uri);
|
|
183
|
+
if (!ref) {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
return {
|
|
188
|
+
content: ref.instance.getText(),
|
|
189
|
+
lineErrors: this.getFileErrors(file.uri),
|
|
190
|
+
path: workspaceRoot.relative(file.uri)!.toString(),
|
|
191
|
+
language: ref.instance.languageId!,
|
|
192
|
+
};
|
|
193
|
+
} catch (e) {
|
|
194
|
+
return null;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
private getFileErrors(uri: URI): string[] {
|
|
199
|
+
return this.markerService
|
|
200
|
+
.getManager()
|
|
201
|
+
.getMarkers({
|
|
202
|
+
resource: uri.toString(),
|
|
203
|
+
severities: MarkerSeverity.Error,
|
|
204
|
+
})
|
|
205
|
+
.map((marker) => marker.message);
|
|
206
|
+
}
|
|
168
207
|
}
|
|
@@ -170,7 +170,7 @@ export class InlineCompletionsController extends BaseAIMonacoEditorController {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
// 如果上一次补全结果还在,则不重复请求
|
|
173
|
-
const isVisible = this.aiNativeContextKey.
|
|
173
|
+
const isVisible = this.aiNativeContextKey.codeEditsIsVisible.get();
|
|
174
174
|
if (isVisible) {
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
@@ -244,8 +244,8 @@ export abstract class WindowedMatcher {
|
|
|
244
244
|
tokens.slice(startLine, endLine).forEach((token) => token.forEach((word) => size.add(word)));
|
|
245
245
|
cache.push(size);
|
|
246
246
|
}
|
|
247
|
-
const
|
|
248
|
-
const score = this.similarityScore(
|
|
247
|
+
const traget = cache[index];
|
|
248
|
+
const score = this.similarityScore(traget, this.referenceTokens);
|
|
249
249
|
snippets.push({
|
|
250
250
|
score,
|
|
251
251
|
startLine,
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
import { MAX_NEIGHBOR_AGGREGATE_LENGTH } from './const';
|
|
16
16
|
import { FixedWindowSizeJaccardMatcher } from './jaccardMatcher';
|
|
17
17
|
|
|
18
|
-
export const getOpenedTabFileList = (
|
|
18
|
+
export const getOpenedTabFileList = (docuemnts: IEditorDocumentModel[]) => {
|
|
19
19
|
// 过滤超大文档
|
|
20
|
-
const recentFiles =
|
|
20
|
+
const recentFiles = docuemnts.filter((document) => isDocumentValid(document));
|
|
21
21
|
return recentFiles;
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -69,7 +69,11 @@ export class CodeEditsResultValue<T extends ICodeEdit = ICodeEdit> extends Dispo
|
|
|
69
69
|
}));
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
public get
|
|
72
|
+
public get firstRange(): IRange {
|
|
73
73
|
return this.raw.items[0].range;
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
public get firstText(): string {
|
|
77
|
+
return this.raw.items[0].insertText;
|
|
78
|
+
}
|
|
75
79
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
KeybindingScope,
|
|
9
9
|
} from '@opensumi/ide-core-browser';
|
|
10
10
|
import { AI_CODE_EDITS_COMMANDS } from '@opensumi/ide-core-browser/lib/ai-native/command';
|
|
11
|
-
import {
|
|
11
|
+
import { CodeEditsIsVisible } from '@opensumi/ide-core-browser/lib/contextkey/ai-native';
|
|
12
12
|
import { CommandContribution, CommandRegistry, Domain } from '@opensumi/ide-core-common';
|
|
13
13
|
import { WorkbenchEditorService } from '@opensumi/ide-editor';
|
|
14
14
|
import { WorkbenchEditorServiceImpl } from '@opensumi/ide-editor/lib/browser/workbench-editor.service';
|
|
@@ -61,7 +61,7 @@ export class IntelligentCompletionsContribution implements KeybindingContributio
|
|
|
61
61
|
keybindings.registerKeybinding({
|
|
62
62
|
command: AI_CODE_EDITS_COMMANDS.DISCARD.id,
|
|
63
63
|
keybinding: Key.ESCAPE.code,
|
|
64
|
-
when:
|
|
64
|
+
when: CodeEditsIsVisible.raw,
|
|
65
65
|
priority: 100,
|
|
66
66
|
});
|
|
67
67
|
|
|
@@ -69,7 +69,7 @@ export class IntelligentCompletionsContribution implements KeybindingContributio
|
|
|
69
69
|
{
|
|
70
70
|
command: AI_CODE_EDITS_COMMANDS.ACCEPT.id,
|
|
71
71
|
keybinding: Key.TAB.code,
|
|
72
|
-
when:
|
|
72
|
+
when: CodeEditsIsVisible.raw,
|
|
73
73
|
},
|
|
74
74
|
KeybindingScope.USER,
|
|
75
75
|
);
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
KeybindingScope,
|
|
6
6
|
PreferenceService,
|
|
7
7
|
} from '@opensumi/ide-core-browser';
|
|
8
|
-
import {
|
|
8
|
+
import { CodeEditsIsVisible } from '@opensumi/ide-core-browser/lib/contextkey/ai-native';
|
|
9
9
|
import {
|
|
10
10
|
AINativeSettingSectionsId,
|
|
11
11
|
CodeEditsRT,
|
|
@@ -98,13 +98,13 @@ export class IntelligentCompletionsController extends BaseAIMonacoEditorControll
|
|
|
98
98
|
this.monacoEditor,
|
|
99
99
|
]);
|
|
100
100
|
|
|
101
|
-
const multiLineEditsIsVisibleKey = new Set([
|
|
101
|
+
const multiLineEditsIsVisibleKey = new Set([CodeEditsIsVisible.raw]);
|
|
102
102
|
this.multiLineEditsIsVisibleObs = observableFromEvent(
|
|
103
103
|
this,
|
|
104
104
|
Event.filter(this.aiNativeContextKey.contextKeyService!.onDidChangeContext, (e: ContextKeyChangeEvent) =>
|
|
105
105
|
e.payload.affectsSome(multiLineEditsIsVisibleKey),
|
|
106
106
|
),
|
|
107
|
-
() => !!this.aiNativeContextKey.
|
|
107
|
+
() => !!this.aiNativeContextKey.codeEditsIsVisible.get(),
|
|
108
108
|
);
|
|
109
109
|
|
|
110
110
|
this.registerFeature(this.monacoEditor);
|
|
@@ -205,7 +205,7 @@ export class IntelligentCompletionsController extends BaseAIMonacoEditorControll
|
|
|
205
205
|
|
|
206
206
|
public hide() {
|
|
207
207
|
this.cancelToken();
|
|
208
|
-
this.aiNativeContextKey.
|
|
208
|
+
this.aiNativeContextKey.codeEditsIsVisible.reset();
|
|
209
209
|
this.codeEditsPreviewer.hide();
|
|
210
210
|
}
|
|
211
211
|
|
|
@@ -273,6 +273,7 @@ export class IntelligentCompletionsController extends BaseAIMonacoEditorControll
|
|
|
273
273
|
public trigger(tx: ITransaction): void {
|
|
274
274
|
const triggerSource = this.codeEditsSourceCollection.getSource(TriggerCodeEditsSource) as TriggerCodeEditsSource;
|
|
275
275
|
if (triggerSource) {
|
|
276
|
+
this.hide();
|
|
276
277
|
triggerSource.triggerSignal.trigger(tx);
|
|
277
278
|
}
|
|
278
279
|
}
|
|
@@ -289,7 +290,7 @@ export class IntelligentCompletionsController extends BaseAIMonacoEditorControll
|
|
|
289
290
|
const range = completionModel.items[0].range;
|
|
290
291
|
if (position.lineNumber < range.startLineNumber || position.lineNumber > range.endLineNumber) {
|
|
291
292
|
runWhenIdle(() => {
|
|
292
|
-
this.
|
|
293
|
+
this.hide();
|
|
293
294
|
});
|
|
294
295
|
}
|
|
295
296
|
}
|
|
@@ -314,7 +315,7 @@ export class IntelligentCompletionsController extends BaseAIMonacoEditorControll
|
|
|
314
315
|
handleChange: (context) => {
|
|
315
316
|
if (context.didChange(this.codeEditsSourceCollection.codeEditsContextBean)) {
|
|
316
317
|
// 如果上一次补全结果还在,则不重复请求
|
|
317
|
-
const isVisible = this.aiNativeContextKey.
|
|
318
|
+
const isVisible = this.aiNativeContextKey.codeEditsIsVisible.get();
|
|
318
319
|
return !isVisible;
|
|
319
320
|
}
|
|
320
321
|
return false;
|
|
@@ -51,19 +51,21 @@ export class CodeEditsPreviewer extends Disposable {
|
|
|
51
51
|
|
|
52
52
|
public render(completionModel: CodeEditsResultValue) {
|
|
53
53
|
this.view?.render(completionModel);
|
|
54
|
-
this.aiNativeContextKey.
|
|
54
|
+
this.aiNativeContextKey.codeEditsIsVisible.set(true);
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
public hide() {
|
|
58
58
|
this.view?.hide();
|
|
59
|
-
this.aiNativeContextKey.
|
|
59
|
+
this.aiNativeContextKey.codeEditsIsVisible.set(false);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
public accept() {
|
|
63
63
|
this.view?.accept();
|
|
64
|
+
this.aiNativeContextKey.codeEditsIsVisible.set(false);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
public discard() {
|
|
67
68
|
this.view?.discard();
|
|
69
|
+
this.aiNativeContextKey.codeEditsIsVisible.set(false);
|
|
68
70
|
}
|
|
69
71
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AI_CODE_EDITS_COMMANDS } from '@opensumi/ide-core-browser/lib/ai-native/command';
|
|
2
|
+
import { CommandService } from '@opensumi/ide-core-common';
|
|
1
3
|
import {
|
|
2
4
|
InlineCompletionContext,
|
|
3
5
|
InlineCompletionTriggerKind,
|
|
@@ -27,6 +29,7 @@ import {
|
|
|
27
29
|
|
|
28
30
|
import { CodeEditsResultValue, ICodeEdit, ICodeEditsResult } from '../index';
|
|
29
31
|
|
|
32
|
+
|
|
30
33
|
import { BaseCodeEditsView } from './base';
|
|
31
34
|
|
|
32
35
|
/**
|
|
@@ -80,17 +83,23 @@ export class DefaultCodeEditsView extends BaseCodeEditsView {
|
|
|
80
83
|
return;
|
|
81
84
|
}
|
|
82
85
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
const position = this.editorObs.positions.get()?.[0];
|
|
87
|
+
if (!position) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const model = this.editorObs.model.get();
|
|
92
|
+
if (!model) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
88
95
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
96
|
+
const originalContent = model.getValueInRange(completionModel.firstRange);
|
|
97
|
+
// edits 的内容与原内容一样就不展示
|
|
98
|
+
if (originalContent === completionModel.firstText) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
93
101
|
|
|
102
|
+
asyncTransaction(async (tx) => {
|
|
94
103
|
const versionId = this.editorObs.versionId.get();
|
|
95
104
|
const context: InlineCompletionContext = {
|
|
96
105
|
triggerKind: InlineCompletionTriggerKind.Automatic,
|
|
@@ -103,16 +112,20 @@ export class DefaultCodeEditsView extends BaseCodeEditsView {
|
|
|
103
112
|
const inlineEdits: InlineCompletionProviderResult = await provideInlineCompletions(
|
|
104
113
|
{
|
|
105
114
|
all: () => [
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
{
|
|
116
|
+
provideInlineCompletions: () => {},
|
|
117
|
+
provideInlineEditsForRange(model, range, context, token) {
|
|
118
|
+
return completionModel;
|
|
119
|
+
},
|
|
120
|
+
freeInlineCompletions: () => [],
|
|
121
|
+
handleRejection: (completions, item) => {
|
|
122
|
+
const commandService: CommandService = this.injector.get(CommandService);
|
|
123
|
+
commandService.executeCommand(AI_CODE_EDITS_COMMANDS.DISCARD.id);
|
|
124
|
+
},
|
|
125
|
+
} as InlineCompletionsProvider<ICodeEditsResult<ICodeEdit>>,
|
|
126
|
+
],
|
|
114
127
|
} as unknown as LanguageFeatureRegistry<InlineCompletionsProvider>,
|
|
115
|
-
Range.lift(completionModel.
|
|
128
|
+
Range.lift(completionModel.firstRange),
|
|
116
129
|
model,
|
|
117
130
|
context,
|
|
118
131
|
);
|
|
@@ -122,9 +135,11 @@ export class DefaultCodeEditsView extends BaseCodeEditsView {
|
|
|
122
135
|
request,
|
|
123
136
|
model,
|
|
124
137
|
this.editorObs.versionId,
|
|
125
|
-
constObservable(
|
|
138
|
+
constObservable(4000),
|
|
126
139
|
);
|
|
140
|
+
|
|
127
141
|
source.inlineCompletions.set(completions, tx);
|
|
142
|
+
source.loading.set(false, tx);
|
|
128
143
|
});
|
|
129
144
|
}
|
|
130
145
|
|
package/src/browser/index.ts
CHANGED
|
@@ -55,6 +55,8 @@ import { RenameCandidatesProviderRegistry } from './contrib/rename/rename.featur
|
|
|
55
55
|
import { TerminalAIContribution } from './contrib/terminal/terminal-ai.contributon';
|
|
56
56
|
import { TerminalFeatureRegistry } from './contrib/terminal/terminal.feature.registry';
|
|
57
57
|
import { LanguageParserService } from './languages/service';
|
|
58
|
+
import { MCPConfigCommandContribution } from './mcp/config/mcp-config.commands';
|
|
59
|
+
import { MCPConfigContribution } from './mcp/config/mcp-config.contribution';
|
|
58
60
|
import { MCPServerProxyService } from './mcp/mcp-server-proxy.service';
|
|
59
61
|
import { MCPServerRegistry } from './mcp/mcp-server.feature.registry';
|
|
60
62
|
import { CreateNewFileWithTextTool } from './mcp/tools/createNewFileWithText';
|
|
@@ -91,6 +93,8 @@ export class AINativeModule extends BrowserModule {
|
|
|
91
93
|
AICodeActionContribution,
|
|
92
94
|
AINativePreferencesContribution,
|
|
93
95
|
IntelligentCompletionsContribution,
|
|
96
|
+
MCPConfigContribution,
|
|
97
|
+
MCPConfigCommandContribution,
|
|
94
98
|
|
|
95
99
|
// MCP Server Contributions START
|
|
96
100
|
ListDirTool,
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
padding: 8px 12px;
|
|
15
15
|
min-width: initial;
|
|
16
16
|
margin: 0;
|
|
17
|
-
|
|
18
|
-
::after {
|
|
19
|
-
content: '';
|
|
20
|
-
}
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
.rce-mbox-text {
|
|
24
20
|
line-height: 18px;
|
|
25
21
|
width: inherit;
|
|
26
22
|
font-size: 12px;
|
|
23
|
+
|
|
24
|
+
&::after {
|
|
25
|
+
display: none;
|
|
26
|
+
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
.rce-smsg {
|