@opensumi/ide-ai-native 3.8.2 → 3.8.3-next-1741666419.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/components/WelcomeMsg.js +1 -1
- package/lib/browser/components/WelcomeMsg.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/view/default.d.ts.map +1 -1
- package/lib/browser/contrib/intelligent-completions/view/default.js.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js.map +1 -1
- package/lib/browser/mcp/tools/components/ExpandableFileList.d.ts.map +1 -1
- package/lib/browser/mcp/tools/components/ExpandableFileList.js +3 -1
- package/lib/browser/mcp/tools/components/ExpandableFileList.js.map +1 -1
- package/lib/browser/mcp/tools/components/Terminal.d.ts.map +1 -1
- package/lib/browser/mcp/tools/components/Terminal.js +6 -5
- package/lib/browser/mcp/tools/components/Terminal.js.map +1 -1
- package/lib/browser/mcp/tools/components/computeAnsiLogString.d.ts +4 -0
- package/lib/browser/mcp/tools/components/computeAnsiLogString.d.ts.map +1 -0
- package/lib/browser/mcp/tools/components/computeAnsiLogString.js +22 -0
- package/lib/browser/mcp/tools/components/computeAnsiLogString.js.map +1 -0
- package/lib/browser/mcp/tools/components/filterEraseMultipleLine.d.ts +18 -0
- package/lib/browser/mcp/tools/components/filterEraseMultipleLine.d.ts.map +1 -0
- package/lib/browser/mcp/tools/components/filterEraseMultipleLine.js +69 -0
- package/lib/browser/mcp/tools/components/filterEraseMultipleLine.js.map +1 -0
- package/lib/browser/mcp/tools/components/index.module.less +8 -5
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts.map +1 -1
- package/lib/browser/mcp/tools/createNewFileWithText.js +1 -0
- package/lib/browser/mcp/tools/createNewFileWithText.js.map +1 -1
- package/lib/browser/mcp/tools/editFile.d.ts.map +1 -1
- package/lib/browser/mcp/tools/editFile.js +1 -0
- package/lib/browser/mcp/tools/editFile.js.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.js +1 -0
- 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 +2 -1
- package/lib/browser/mcp/tools/getDiagnosticsByPath.js.map +1 -1
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.d.ts.map +1 -1
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.js +2 -0
- package/lib/browser/mcp/tools/getOpenEditorFileDiagnostics.js.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.js +1 -0
- package/lib/browser/mcp/tools/grepSearch.js.map +1 -1
- package/lib/browser/mcp/tools/listDir.d.ts.map +1 -1
- package/lib/browser/mcp/tools/listDir.js +1 -0
- package/lib/browser/mcp/tools/listDir.js.map +1 -1
- package/lib/browser/mcp/tools/readFile.d.ts.map +1 -1
- package/lib/browser/mcp/tools/readFile.js +1 -0
- package/lib/browser/mcp/tools/readFile.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/types.d.ts +1 -0
- package/lib/browser/types.d.ts.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.map +1 -1
- package/lib/common/prompts/context-prompt-provider.d.ts.map +1 -1
- package/lib/common/prompts/context-prompt-provider.js +4 -2
- package/lib/common/prompts/context-prompt-provider.js.map +1 -1
- package/package.json +24 -23
- package/src/browser/components/WelcomeMsg.tsx +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/view/default.ts +0 -1
- package/src/browser/mcp/mcp-server.feature.registry.ts +1 -1
- package/src/browser/mcp/tools/components/ExpandableFileList.tsx +4 -1
- package/src/browser/mcp/tools/components/Terminal.tsx +4 -6
- package/src/browser/mcp/tools/components/computeAnsiLogString.ts +24 -0
- package/src/browser/mcp/tools/components/filterEraseMultipleLine.ts +71 -0
- package/src/browser/mcp/tools/components/index.module.less +8 -5
- package/src/browser/mcp/tools/createNewFileWithText.ts +1 -0
- package/src/browser/mcp/tools/editFile.ts +1 -0
- package/src/browser/mcp/tools/fileSearch.ts +1 -0
- package/src/browser/mcp/tools/getDiagnosticsByPath.ts +2 -1
- package/src/browser/mcp/tools/getOpenEditorFileDiagnostics.ts +2 -0
- package/src/browser/mcp/tools/grepSearch.ts +1 -0
- package/src/browser/mcp/tools/listDir.ts +1 -0
- package/src/browser/mcp/tools/readFile.ts +1 -0
- package/src/browser/mcp/tools/runTerminalCmd.ts +1 -0
- package/src/browser/types.ts +1 -0
- package/src/browser/widget/inline-diff/inline-diff-manager.tsx +0 -1
- package/src/common/prompts/context-prompt-provider.ts +6 -2
|
@@ -41,6 +41,7 @@ export class ListDirTool implements MCPServerContribution {
|
|
|
41
41
|
return {
|
|
42
42
|
name: 'list_dir',
|
|
43
43
|
label: 'List Directory',
|
|
44
|
+
order: 3,
|
|
44
45
|
description:
|
|
45
46
|
'List the contents of a directory. The quick tool to use for discovery, before using more targeted tools like semantic search or file reading. Useful to try to understand the file structure before diving deeper into specific files. Can be used to explore the codebase.',
|
|
46
47
|
inputSchema,
|
|
@@ -38,6 +38,7 @@ export class ReadFileTool implements MCPServerContribution {
|
|
|
38
38
|
return {
|
|
39
39
|
name: 'read_file',
|
|
40
40
|
label: 'Read File',
|
|
41
|
+
order: 1,
|
|
41
42
|
description: `Read the contents of a file (and the outline).
|
|
42
43
|
|
|
43
44
|
When using this tool to gather information, it's your responsibility to ensure you have the COMPLETE context. Each time you call this command you should:
|
|
@@ -33,6 +33,7 @@ export class RunTerminalCommandTool implements MCPServerContribution {
|
|
|
33
33
|
return {
|
|
34
34
|
name: 'run_terminal_cmd',
|
|
35
35
|
label: 'Run Command',
|
|
36
|
+
order: 2,
|
|
36
37
|
description:
|
|
37
38
|
"PROPOSE a command to run on behalf of the user.\nIf you have this tool, note that you DO have the ability to run commands directly on the USER's system.\n\nAdhere to these rules:\n1. Based on the contents of the conversation, you will be told if you are in the same shell as a previous step or a new shell.\n2. If in a new shell, you should `cd` to the right directory and do necessary setup in addition to running the command.\n3. If in the same shell, the state will persist, no need to do things like `cd` to the same directory.\n4. For ANY commands that would use a pager, you should append ` | cat` to the command (or whatever is appropriate). You MUST do this for: git, less, head, tail, more, etc.\n5. For commands that are long running/expected to run indefinitely until interruption, please run them in the background. To run jobs in the background, set `is_background` to true rather than changing the details of the command.\n6. Dont include any newlines in the command.",
|
|
38
39
|
inputSchema,
|
package/src/browser/types.ts
CHANGED
|
@@ -3,7 +3,6 @@ import React, { useCallback, useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { Icon, Popover } from '@opensumi/ide-components';
|
|
4
4
|
import { AppConfig, IDisposable, URI, localize, path, useInjectable } from '@opensumi/ide-core-browser';
|
|
5
5
|
import { IResource, WorkbenchEditorService } from '@opensumi/ide-editor';
|
|
6
|
-
import { Path } from '@opensumi/ide-utils/lib/path';
|
|
7
6
|
|
|
8
7
|
import { BaseApplyService } from '../../mcp/base-apply.service';
|
|
9
8
|
|
|
@@ -42,11 +42,15 @@ ${context.recentlyViewFiles.map((file, idx) => ` ${idx + 1}: ${file}`).join('
|
|
|
42
42
|
`,
|
|
43
43
|
)}
|
|
44
44
|
</attached_files>
|
|
45
|
-
${
|
|
45
|
+
${
|
|
46
|
+
currentModel
|
|
47
|
+
? `<current_opened_file>
|
|
46
48
|
\`\`\`${currentModel.languageId} ${currentModel.uri.toString()}
|
|
47
49
|
${currentModel.getText()}
|
|
48
50
|
\`\`\`
|
|
49
|
-
</current_opened_file>`
|
|
51
|
+
</current_opened_file>`
|
|
52
|
+
: ''
|
|
53
|
+
}
|
|
50
54
|
</additional_data>
|
|
51
55
|
<user_query>
|
|
52
56
|
${userMessage}
|