@opensumi/ide-ai-native 3.9.1-next-1749022986.0 → 3.9.1-next-1749115679.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/ChatMentionInput.d.ts.map +1 -1
- package/lib/browser/components/ChatMentionInput.js +3 -18
- package/lib/browser/components/ChatMentionInput.js.map +1 -1
- package/lib/browser/components/ChatReply.js +2 -2
- package/lib/browser/components/ChatReply.js.map +1 -1
- package/lib/browser/components/components.module.less +8 -30
- package/lib/browser/components/mention-input/mention-input.d.ts.map +1 -1
- package/lib/browser/components/mention-input/mention-input.js +36 -30
- package/lib/browser/components/mention-input/mention-input.js.map +1 -1
- package/lib/browser/components/mention-input/mention-input.module.less +1 -0
- package/lib/browser/components/mention-input/types.d.ts +0 -13
- package/lib/browser/components/mention-input/types.d.ts.map +1 -1
- package/lib/browser/components/mention-input/types.js.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.d.ts.map +1 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js +7 -1
- package/lib/browser/mcp/mcp-server.feature.registry.js.map +1 -1
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts +1 -3
- package/lib/browser/mcp/tools/createNewFileWithText.d.ts.map +1 -1
- package/lib/browser/mcp/tools/createNewFileWithText.js +14 -40
- package/lib/browser/mcp/tools/createNewFileWithText.js.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/fileSearch.js +9 -5
- package/lib/browser/mcp/tools/fileSearch.js.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.d.ts.map +1 -1
- package/lib/browser/mcp/tools/grepSearch.js +22 -10
- package/lib/browser/mcp/tools/grepSearch.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.d.ts +15 -0
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.d.ts.map +1 -0
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.js +53 -0
- package/lib/browser/mcp/tools/handlers/CreateNewFileWithText.js.map +1 -0
- package/lib/browser/mcp/tools/handlers/ListDir.js +1 -1
- package/lib/browser/mcp/tools/handlers/ListDir.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/ReadFile.js +1 -1
- package/lib/browser/mcp/tools/handlers/ReadFile.js.map +1 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts +11 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.d.ts.map +1 -1
- package/lib/browser/mcp/tools/handlers/RunCommand.js +11 -4
- package/lib/browser/mcp/tools/handlers/RunCommand.js.map +1 -1
- package/lib/browser/mcp/tools/listDir.d.ts.map +1 -1
- package/lib/browser/mcp/tools/listDir.js +19 -15
- package/lib/browser/mcp/tools/listDir.js.map +1 -1
- package/lib/browser/rules/rules.module.less +0 -1
- package/lib/browser/rules/rules.view.js +1 -1
- package/lib/browser/rules/rules.view.js.map +1 -1
- package/lib/common/model.d.ts +0 -1
- package/lib/common/model.d.ts.map +1 -1
- package/lib/common/model.js.map +1 -1
- package/lib/node/base-language-model.js +1 -2
- package/lib/node/base-language-model.js.map +1 -1
- package/lib/node/mcp-server.sse.d.ts +187 -1
- package/lib/node/mcp-server.sse.d.ts.map +1 -1
- package/lib/node/mcp-server.sse.js +2 -2
- package/lib/node/mcp-server.sse.js.map +1 -1
- package/lib/node/mcp-server.stdio.d.ts +187 -1
- package/lib/node/mcp-server.stdio.d.ts.map +1 -1
- package/package.json +26 -26
- package/src/browser/components/ChatMentionInput.tsx +4 -26
- package/src/browser/components/ChatReply.tsx +4 -4
- package/src/browser/components/components.module.less +8 -30
- package/src/browser/components/mention-input/mention-input.module.less +1 -0
- package/src/browser/components/mention-input/mention-input.tsx +52 -38
- package/src/browser/components/mention-input/types.ts +0 -14
- package/src/browser/mcp/mcp-server.feature.registry.ts +6 -1
- package/src/browser/mcp/tools/createNewFileWithText.ts +17 -46
- package/src/browser/mcp/tools/fileSearch.ts +8 -5
- package/src/browser/mcp/tools/grepSearch.ts +32 -21
- package/src/browser/mcp/tools/handlers/CreateNewFileWithText.ts +49 -0
- package/src/browser/mcp/tools/handlers/ListDir.ts +2 -2
- package/src/browser/mcp/tools/handlers/ReadFile.ts +2 -2
- package/src/browser/mcp/tools/handlers/RunCommand.ts +21 -14
- package/src/browser/mcp/tools/listDir.ts +15 -12
- package/src/browser/rules/rules.module.less +0 -1
- package/src/browser/rules/rules.view.tsx +1 -1
- package/src/common/model.ts +0 -1
- package/src/node/base-language-model.ts +1 -1
- package/src/node/mcp-server.sse.ts +1 -2
- package/lib/browser/components/mention-input/mention-select.d.ts +0 -28
- package/lib/browser/components/mention-input/mention-select.d.ts.map +0 -1
- package/lib/browser/components/mention-input/mention-select.js +0 -136
- package/lib/browser/components/mention-input/mention-select.js.map +0 -1
- package/lib/browser/components/mention-input/mention-select.module.less +0 -297
- package/src/browser/components/mention-input/mention-select.module.less +0 -297
- package/src/browser/components/mention-input/mention-select.tsx +0 -256
|
@@ -46,17 +46,6 @@ export interface MentionState {
|
|
|
46
46
|
interface ModelOption {
|
|
47
47
|
label: string;
|
|
48
48
|
value: string;
|
|
49
|
-
icon?: string;
|
|
50
|
-
iconClass?: string;
|
|
51
|
-
tags?: string[];
|
|
52
|
-
description?: string;
|
|
53
|
-
badge?: string;
|
|
54
|
-
badgeColor?: string;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export interface ExtendedModelOption extends ModelOption {
|
|
58
|
-
disabled?: boolean;
|
|
59
|
-
selected?: boolean; // 由外部控制选中状态
|
|
60
49
|
}
|
|
61
50
|
|
|
62
51
|
export interface ExtendedModelOption {
|
|
@@ -100,9 +89,6 @@ export interface FooterConfig {
|
|
|
100
89
|
buttons?: FooterButton[];
|
|
101
90
|
showModelSelector?: boolean;
|
|
102
91
|
disableModelSelector?: boolean;
|
|
103
|
-
showThinking?: boolean;
|
|
104
|
-
thinkingEnabled?: boolean;
|
|
105
|
-
onThinkingChange?: (enabled: boolean) => void;
|
|
106
92
|
}
|
|
107
93
|
|
|
108
94
|
export interface MentionInputProps {
|
|
@@ -44,7 +44,12 @@ export class MCPServerRegistry implements IMCPServerRegistry {
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
registerMCPTool(tool: MCPToolDefinition): void {
|
|
47
|
-
this.tools.
|
|
47
|
+
const existingIndex = this.tools.findIndex((t) => t.name === tool.name);
|
|
48
|
+
if (existingIndex !== -1) {
|
|
49
|
+
this.tools[existingIndex] = tool;
|
|
50
|
+
} else {
|
|
51
|
+
this.tools.push(tool);
|
|
52
|
+
}
|
|
48
53
|
}
|
|
49
54
|
|
|
50
55
|
registerToolComponent(
|
|
@@ -1,30 +1,27 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
import { Autowired } from '@opensumi/di';
|
|
4
|
-
import { Domain
|
|
5
|
-
import { IFileServiceClient } from '@opensumi/ide-file-service';
|
|
6
|
-
import { IWorkspaceService } from '@opensumi/ide-workspace';
|
|
4
|
+
import { Domain } from '@opensumi/ide-core-common';
|
|
7
5
|
|
|
8
6
|
import { IMCPServerRegistry, MCPLogger, MCPServerContribution, MCPToolDefinition } from '../../types';
|
|
9
|
-
import { BaseApplyService } from '../base-apply.service';
|
|
10
7
|
|
|
11
8
|
import { EditFileToolComponent } from './components/EditFile';
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
import { CreateNewFileWithTextHandler } from './handlers/CreateNewFileWithText';
|
|
10
|
+
|
|
11
|
+
const inputSchema = z
|
|
12
|
+
.object({
|
|
13
|
+
target_file: z.string().describe('The relative path where the file should be created'),
|
|
14
|
+
code_edit: z.string().describe('The content to write into the new file'),
|
|
15
|
+
})
|
|
16
|
+
.transform((data) => ({
|
|
17
|
+
targetFile: data.target_file,
|
|
18
|
+
codeEdit: data.code_edit,
|
|
19
|
+
}));
|
|
17
20
|
|
|
18
21
|
@Domain(MCPServerContribution)
|
|
19
22
|
export class CreateNewFileWithTextTool implements MCPServerContribution {
|
|
20
|
-
@Autowired(
|
|
21
|
-
private readonly
|
|
22
|
-
|
|
23
|
-
@Autowired(IFileServiceClient)
|
|
24
|
-
private readonly fileService: IFileServiceClient;
|
|
25
|
-
|
|
26
|
-
@Autowired(BaseApplyService)
|
|
27
|
-
private applyService: BaseApplyService;
|
|
23
|
+
@Autowired(CreateNewFileWithTextHandler)
|
|
24
|
+
private readonly createNewFileWithTextHandler: CreateNewFileWithTextHandler;
|
|
28
25
|
|
|
29
26
|
registerMCPServer(registry: IMCPServerRegistry): void {
|
|
30
27
|
registry.registerMCPTool(this.getToolDefinition());
|
|
@@ -50,36 +47,10 @@ export class CreateNewFileWithTextTool implements MCPServerContribution {
|
|
|
50
47
|
|
|
51
48
|
private async handler(args: z.infer<typeof inputSchema> & { toolCallId: string }, logger: MCPLogger) {
|
|
52
49
|
try {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if (!workspaceRoots || workspaceRoots.length === 0) {
|
|
56
|
-
logger.appendLine('Error: Cannot determine project directory');
|
|
57
|
-
return {
|
|
58
|
-
content: [{ type: 'text', text: "can't find project dir" }],
|
|
59
|
-
isError: true,
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
// 构建完整的文件路径
|
|
64
|
-
const rootUri = URI.parse(workspaceRoots[0].uri);
|
|
65
|
-
const fullPath = path.join(rootUri.codeUri.fsPath, args.target_file);
|
|
66
|
-
const fileUri = URI.file(fullPath);
|
|
67
|
-
|
|
68
|
-
// 创建父目录
|
|
69
|
-
const parentDir = path.dirname(fullPath);
|
|
70
|
-
const parentUri = URI.file(parentDir);
|
|
71
|
-
await this.fileService.createFolder(parentUri.toString());
|
|
72
|
-
|
|
73
|
-
// 创建文件
|
|
74
|
-
await this.fileService.createFile(fileUri.toString());
|
|
75
|
-
|
|
76
|
-
// 使用 applyService 写入文件内容
|
|
77
|
-
const codeBlock = await this.applyService.registerCodeBlock(args.target_file, args.code_edit, args.toolCallId);
|
|
78
|
-
await this.applyService.apply(codeBlock);
|
|
79
|
-
|
|
80
|
-
logger.appendLine(`Successfully created file at: ${args.target_file}`);
|
|
50
|
+
await this.createNewFileWithTextHandler.handler(args, args.toolCallId);
|
|
51
|
+
logger.appendLine(`Successfully created file at: ${args.targetFile}`);
|
|
81
52
|
return {
|
|
82
|
-
content: [{ type: 'text', text: '
|
|
53
|
+
content: [{ type: 'text', text: 'create file with text success' }],
|
|
83
54
|
};
|
|
84
55
|
} catch (error) {
|
|
85
56
|
logger.appendLine(`Error during file creation: ${error}`);
|
|
@@ -80,11 +80,14 @@ export class FileSearchTool implements MCPServerContribution {
|
|
|
80
80
|
});
|
|
81
81
|
|
|
82
82
|
const messages = this.chatInternalService.sessionModel.history.getMessages();
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
83
|
+
const messageId = messages[messages.length - 1]?.id;
|
|
84
|
+
if (messageId) {
|
|
85
|
+
this.chatInternalService.sessionModel.history.setMessageAdditional(messageId, {
|
|
86
|
+
[args.toolCallId]: {
|
|
87
|
+
files,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
88
91
|
|
|
89
92
|
logger.appendLine(`Found ${files.length} files matching "${args.query}"`);
|
|
90
93
|
|
|
@@ -12,19 +12,27 @@ import { IMCPServerRegistry, MCPLogger, MCPServerContribution, MCPToolDefinition
|
|
|
12
12
|
|
|
13
13
|
import { GrepSearchToolComponent } from './components/ExpandableFileList';
|
|
14
14
|
|
|
15
|
-
const inputSchema = z
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
15
|
+
const inputSchema = z
|
|
16
|
+
.object({
|
|
17
|
+
query: z.string().describe('The regex pattern to search for'),
|
|
18
|
+
case_sensitive: z.boolean().optional().describe('Whether the search should be case sensitive'),
|
|
19
|
+
include_pattern: z
|
|
20
|
+
.string()
|
|
21
|
+
.optional()
|
|
22
|
+
.describe('Glob pattern for files to include (e.g. "*.ts" for TypeScript files)'),
|
|
23
|
+
exclude_pattern: z.string().optional().describe('Glob pattern for files to exclude'),
|
|
24
|
+
explanation: z
|
|
25
|
+
.string()
|
|
26
|
+
.optional()
|
|
27
|
+
.describe('One sentence explanation as to why this tool is being used, and how it contributes to the goal.'),
|
|
28
|
+
})
|
|
29
|
+
.transform((data) => ({
|
|
30
|
+
query: data.query,
|
|
31
|
+
caseSensitive: data.case_sensitive,
|
|
32
|
+
includePattern: data.include_pattern,
|
|
33
|
+
excludePattern: data.exclude_pattern,
|
|
34
|
+
explanation: data.explanation,
|
|
35
|
+
}));
|
|
28
36
|
|
|
29
37
|
const MAX_RESULTS = 50;
|
|
30
38
|
|
|
@@ -72,9 +80,9 @@ export class GrepSearchTool implements MCPServerContribution {
|
|
|
72
80
|
await this.searchService.doSearch(
|
|
73
81
|
searchPattern,
|
|
74
82
|
{
|
|
75
|
-
isMatchCase: !!args.
|
|
76
|
-
include: args.
|
|
77
|
-
exclude: args.
|
|
83
|
+
isMatchCase: !!args.caseSensitive,
|
|
84
|
+
include: args.includePattern?.split(','),
|
|
85
|
+
exclude: args.excludePattern?.split(','),
|
|
78
86
|
maxResults: MAX_RESULTS,
|
|
79
87
|
isUseRegexp: true,
|
|
80
88
|
isToggleOpen: false,
|
|
@@ -111,11 +119,14 @@ export class GrepSearchTool implements MCPServerContribution {
|
|
|
111
119
|
}
|
|
112
120
|
deferred.resolve(results.join('\n\n'));
|
|
113
121
|
const messages = this.chatInternalService.sessionModel.history.getMessages();
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
122
|
+
const messageId = messages[messages.length - 1]?.id;
|
|
123
|
+
if (messageId) {
|
|
124
|
+
this.chatInternalService.sessionModel.history.setMessageAdditional(messageId, {
|
|
125
|
+
[args.toolCallId]: {
|
|
126
|
+
files,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
}
|
|
119
130
|
});
|
|
120
131
|
const text = await deferred.promise;
|
|
121
132
|
return {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
+
import { URI, path } from '@opensumi/ide-core-common';
|
|
3
|
+
import { IFileServiceClient } from '@opensumi/ide-file-service';
|
|
4
|
+
import { IWorkspaceService } from '@opensumi/ide-workspace';
|
|
5
|
+
|
|
6
|
+
import { CodeBlockData } from '../../../../common/types';
|
|
7
|
+
import { BaseApplyService } from '../../base-apply.service';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* 创建新文件处理器
|
|
11
|
+
* 用于处理创建新文件并写入内容的操作
|
|
12
|
+
*/
|
|
13
|
+
@Injectable()
|
|
14
|
+
export class CreateNewFileWithTextHandler {
|
|
15
|
+
@Autowired(IWorkspaceService)
|
|
16
|
+
private readonly workspaceService: IWorkspaceService;
|
|
17
|
+
|
|
18
|
+
@Autowired(IFileServiceClient)
|
|
19
|
+
private readonly fileService: IFileServiceClient;
|
|
20
|
+
|
|
21
|
+
@Autowired(BaseApplyService)
|
|
22
|
+
private applyService: BaseApplyService;
|
|
23
|
+
|
|
24
|
+
async handler(params: { targetFile: string; codeEdit: string }, toolCallId: string): Promise<CodeBlockData> {
|
|
25
|
+
// 获取工作区根目录
|
|
26
|
+
const workspaceRoots = this.workspaceService.tryGetRoots();
|
|
27
|
+
if (!workspaceRoots || workspaceRoots.length === 0) {
|
|
28
|
+
throw new Error("can't find project dir");
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// 构建完整的文件路径
|
|
32
|
+
const rootUri = URI.parse(workspaceRoots[0].uri);
|
|
33
|
+
const fullPath = path.join(rootUri.codeUri.fsPath, params.targetFile);
|
|
34
|
+
const fileUri = URI.file(fullPath);
|
|
35
|
+
|
|
36
|
+
// 创建父目录
|
|
37
|
+
const parentDir = path.dirname(fullPath);
|
|
38
|
+
const parentUri = URI.file(parentDir);
|
|
39
|
+
await this.fileService.createFolder(parentUri.toString());
|
|
40
|
+
|
|
41
|
+
// 创建文件
|
|
42
|
+
await this.fileService.createFile(fileUri.toString());
|
|
43
|
+
|
|
44
|
+
// 使用 applyService 写入文件内容
|
|
45
|
+
const codeBlock = await this.applyService.registerCodeBlock(params.targetFile, params.codeEdit, toolCallId);
|
|
46
|
+
await this.applyService.apply(codeBlock);
|
|
47
|
+
return codeBlock;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
|
-
import { AppConfig, URI } from '@opensumi/ide-core-browser';
|
|
2
|
+
import { AppConfig, URI, path } from '@opensumi/ide-core-browser';
|
|
3
3
|
import { IFileServiceClient } from '@opensumi/ide-file-service';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -67,7 +67,7 @@ export class ListDirHandler {
|
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
// 解析相对路径
|
|
70
|
-
const absolutePath =
|
|
70
|
+
const absolutePath = path.join(this.appConfig.workspaceDir, relativeWorkspacePath);
|
|
71
71
|
const fileStat = await this.fileSystemService.getFileStat(absolutePath, true);
|
|
72
72
|
// 验证路径有效性
|
|
73
73
|
if (!fileStat || !fileStat.isDirectory) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Autowired, Injectable } from '@opensumi/di';
|
|
2
2
|
import { FileSearchQuickCommandHandler } from '@opensumi/ide-addons/lib/browser/file-search.contribution';
|
|
3
3
|
import { AppConfig } from '@opensumi/ide-core-browser';
|
|
4
|
-
import { CancellationToken, URI } from '@opensumi/ide-core-common';
|
|
4
|
+
import { CancellationToken, URI, path } from '@opensumi/ide-core-common';
|
|
5
5
|
import { IEditorDocumentModelRef, IEditorDocumentModelService } from '@opensumi/ide-editor/lib/browser';
|
|
6
6
|
import { IFileServiceClient } from '@opensumi/ide-file-service';
|
|
7
7
|
|
|
@@ -107,7 +107,7 @@ export class FileHandler {
|
|
|
107
107
|
throw new Error('No read file parameters provided. Need to give at least the path.');
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
const uri = new URI(
|
|
110
|
+
const uri = new URI(path.join(this.appConfig.workspaceDir, fileParams.relativeWorkspacePath));
|
|
111
111
|
if (!uri) {
|
|
112
112
|
const similarFiles = await this.findSimilarFiles(fileParams.relativeWorkspacePath, 3);
|
|
113
113
|
throw this.createFileNotFoundError(fileParams.relativeWorkspacePath, similarFiles);
|
|
@@ -13,18 +13,25 @@ const color = {
|
|
|
13
13
|
reset: '\x1b[0m',
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export const inputSchema = z
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
16
|
+
export const inputSchema = z
|
|
17
|
+
.object({
|
|
18
|
+
command: z.string().describe('The terminal command to execute'),
|
|
19
|
+
is_background: z.boolean().describe('Whether the command should be run in the background'),
|
|
20
|
+
explanation: z
|
|
21
|
+
.string()
|
|
22
|
+
.describe('One sentence explanation as to why this command needs to be run and how it contributes to the goal.'),
|
|
23
|
+
require_user_approval: z
|
|
24
|
+
.boolean()
|
|
25
|
+
.describe(
|
|
26
|
+
"Whether the user must approve the command before it is executed. Only set this to false if the command is safe and if it matches the user's requirements for commands that should be executed automatically.",
|
|
27
|
+
),
|
|
28
|
+
})
|
|
29
|
+
.transform((data) => ({
|
|
30
|
+
command: data.command,
|
|
31
|
+
isBackground: data.is_background,
|
|
32
|
+
explanation: data.explanation,
|
|
33
|
+
requireUserApproval: data.require_user_approval,
|
|
34
|
+
}));
|
|
28
35
|
|
|
29
36
|
@Injectable()
|
|
30
37
|
export class RunCommandHandler {
|
|
@@ -66,7 +73,7 @@ export class RunCommandHandler {
|
|
|
66
73
|
|
|
67
74
|
async handler(args: z.infer<typeof inputSchema> & { toolCallId: string }, logger: MCPLogger) {
|
|
68
75
|
logger.appendLine(`Executing command: ${args.command}`);
|
|
69
|
-
if (this.isAlwaysApproval(args.
|
|
76
|
+
if (this.isAlwaysApproval(args.requireUserApproval)) {
|
|
70
77
|
const def = new Deferred<boolean>();
|
|
71
78
|
this.approvalDeferredMap.set(args.toolCallId, def);
|
|
72
79
|
const approval = await def.promise;
|
|
@@ -93,7 +100,7 @@ export class RunCommandHandler {
|
|
|
93
100
|
const result: { type: string; text: string }[] = [];
|
|
94
101
|
const def = new Deferred<{ isError?: boolean; content: { type: string; text: string }[] }>();
|
|
95
102
|
|
|
96
|
-
if (args.
|
|
103
|
+
if (args.isBackground) {
|
|
97
104
|
def.resolve({
|
|
98
105
|
isError: false,
|
|
99
106
|
content: [{ type: 'text', text: `Successful run command ${args.command} in background.` }],
|
|
@@ -63,18 +63,21 @@ export class ListDirTool implements MCPServerContribution {
|
|
|
63
63
|
|
|
64
64
|
// 设置消息的附加数据
|
|
65
65
|
const messages = this.chatInternalService.sessionModel.history.getMessages();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
66
|
+
const messageId = messages[messages.length - 1]?.id;
|
|
67
|
+
if (messageId) {
|
|
68
|
+
this.chatInternalService.sessionModel.history.setMessageAdditional(messageId, {
|
|
69
|
+
[args.toolCallId]: {
|
|
70
|
+
files: fileUris,
|
|
71
|
+
title: `Listed directory "${args.relativeWorkspacePath}"`,
|
|
72
|
+
details: result.files.map((file) => ({
|
|
73
|
+
type: file.isDirectory ? 'dir' : 'file',
|
|
74
|
+
name: file.name,
|
|
75
|
+
info: file.isDirectory ? `${file.numChildren ?? '?'} items` : `${file.size}KB, ${file.numLines} lines`,
|
|
76
|
+
lastModified: file.lastModified,
|
|
77
|
+
})),
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
|
78
81
|
|
|
79
82
|
logger.appendLine(`Listed ${fileUris.length} files in directory "${args.relativeWorkspacePath}"`);
|
|
80
83
|
|
|
@@ -37,7 +37,7 @@ export const RulesView: React.FC = () => {
|
|
|
37
37
|
[rulesService],
|
|
38
38
|
);
|
|
39
39
|
|
|
40
|
-
const getFileNameFromPath = (path: string) =>
|
|
40
|
+
const getFileNameFromPath = (path: string) => path.split('/').pop() || path;
|
|
41
41
|
|
|
42
42
|
const hasWarning = (rule: ProjectRule) => !rule.description && !rule.alwaysApply && !rule.globs;
|
|
43
43
|
|
package/src/common/model.ts
CHANGED
|
@@ -116,7 +116,7 @@ export abstract class BaseLanguageModel {
|
|
|
116
116
|
messages,
|
|
117
117
|
abortSignal: abortController.signal,
|
|
118
118
|
experimental_toolCallStreaming: true,
|
|
119
|
-
maxSteps:
|
|
119
|
+
maxSteps: 12,
|
|
120
120
|
maxTokens,
|
|
121
121
|
system: systemPrompt,
|
|
122
122
|
providerOptions,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
// have to import with extension since the exports map is ./* -> ./dist/cjs/*
|
|
2
2
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
|
+
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
|
|
3
4
|
import { EventSource } from 'eventsource';
|
|
4
5
|
|
|
5
6
|
import { ILogger } from '@opensumi/ide-core-common';
|
|
@@ -47,8 +48,6 @@ export class SSEMCPServer implements IMCPServer {
|
|
|
47
48
|
}
|
|
48
49
|
this.logger?.log(`Starting server "${this.name}" with url: ${this.url}`);
|
|
49
50
|
|
|
50
|
-
const SSEClientTransport = (await import('@modelcontextprotocol/sdk/client/sse.js')).SSEClientTransport;
|
|
51
|
-
|
|
52
51
|
const transport = new SSEClientTransport(new URL(this.url), this.transportOptions);
|
|
53
52
|
|
|
54
53
|
transport.onerror = (error) => {
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface ExtendedModelOption {
|
|
3
|
-
label: string;
|
|
4
|
-
value: string;
|
|
5
|
-
icon?: string;
|
|
6
|
-
iconClass?: string;
|
|
7
|
-
tags?: string[];
|
|
8
|
-
features?: string[];
|
|
9
|
-
description?: string;
|
|
10
|
-
disabled?: boolean;
|
|
11
|
-
badge?: string;
|
|
12
|
-
badgeColor?: string;
|
|
13
|
-
selected?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface MentionSelectProps {
|
|
16
|
-
options: ExtendedModelOption[];
|
|
17
|
-
value?: string;
|
|
18
|
-
onChange?: (value: string) => void;
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
disabled?: boolean;
|
|
21
|
-
className?: string;
|
|
22
|
-
size?: 'small' | 'medium' | 'large';
|
|
23
|
-
showThinking?: boolean;
|
|
24
|
-
thinkingEnabled?: boolean;
|
|
25
|
-
onThinkingChange?: (enabled: boolean) => void;
|
|
26
|
-
}
|
|
27
|
-
export declare const MentionSelect: React.FC<MentionSelectProps>;
|
|
28
|
-
//# sourceMappingURL=mention-select.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mention-select.d.ts","sourceRoot":"","sources":["../../../../src/browser/components/mention-input/mention-select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,mBAAmB,EAAE,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACpC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAiBD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA6MtD,CAAC"}
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MentionSelect = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const classnames_1 = tslib_1.__importDefault(require("classnames"));
|
|
6
|
-
const react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
-
const click_outside_1 = require("@opensumi/ide-components/lib/click-outside");
|
|
8
|
-
const components_1 = require("@opensumi/ide-core-browser/lib/components");
|
|
9
|
-
const mention_select_module_less_1 = tslib_1.__importDefault(require("./mention-select.module.less"));
|
|
10
|
-
const ThinkingToggle = ({ enabled, onChange }) => (react_1.default.createElement("div", { className: mention_select_module_less_1.default.thinking_toggle, onClick: () => onChange(!enabled) },
|
|
11
|
-
react_1.default.createElement(components_1.Icon, { iconClass: (0, components_1.getIcon)(enabled ? 'check' : 'circle-outline'), className: (0, classnames_1.default)(mention_select_module_less_1.default.thinking_icon, {
|
|
12
|
-
[mention_select_module_less_1.default.enabled]: enabled,
|
|
13
|
-
}) }),
|
|
14
|
-
react_1.default.createElement("span", { className: mention_select_module_less_1.default.thinking_label }, "Thinking")));
|
|
15
|
-
const MentionSelect = ({ options, value, onChange, placeholder, disabled = false, className, size = 'small', showThinking = false, thinkingEnabled = false, onThinkingChange, }) => {
|
|
16
|
-
const [isOpen, setIsOpen] = (0, react_1.useState)(false);
|
|
17
|
-
const [activeIndex, setActiveIndex] = (0, react_1.useState)(-1);
|
|
18
|
-
const [dropdownDirection, setDropdownDirection] = (0, react_1.useState)('up');
|
|
19
|
-
const selectRef = (0, react_1.useRef)(null);
|
|
20
|
-
const dropdownRef = (0, react_1.useRef)(null);
|
|
21
|
-
const selectedOption = options.find((option) => option.selected) || options.find((option) => option.value === value);
|
|
22
|
-
const handleToggle = () => {
|
|
23
|
-
if (!disabled) {
|
|
24
|
-
setIsOpen(!isOpen);
|
|
25
|
-
setActiveIndex(-1);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
const handleSelect = (option) => {
|
|
29
|
-
if (!option.disabled) {
|
|
30
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(option.value);
|
|
31
|
-
setIsOpen(false);
|
|
32
|
-
setActiveIndex(-1);
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const handleKeyDown = (e) => {
|
|
36
|
-
if (disabled) {
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
switch (e.key) {
|
|
40
|
-
case 'Enter':
|
|
41
|
-
case ' ':
|
|
42
|
-
e.preventDefault();
|
|
43
|
-
if (!isOpen) {
|
|
44
|
-
setIsOpen(true);
|
|
45
|
-
}
|
|
46
|
-
else if (activeIndex >= 0) {
|
|
47
|
-
handleSelect(options[activeIndex]);
|
|
48
|
-
}
|
|
49
|
-
break;
|
|
50
|
-
case 'Escape':
|
|
51
|
-
e.preventDefault();
|
|
52
|
-
setIsOpen(false);
|
|
53
|
-
setActiveIndex(-1);
|
|
54
|
-
break;
|
|
55
|
-
case 'ArrowDown':
|
|
56
|
-
e.preventDefault();
|
|
57
|
-
if (!isOpen) {
|
|
58
|
-
setIsOpen(true);
|
|
59
|
-
}
|
|
60
|
-
else {
|
|
61
|
-
setActiveIndex((prev) => (prev < options.length - 1 ? prev + 1 : 0));
|
|
62
|
-
}
|
|
63
|
-
break;
|
|
64
|
-
case 'ArrowUp':
|
|
65
|
-
e.preventDefault();
|
|
66
|
-
if (isOpen) {
|
|
67
|
-
setActiveIndex((prev) => (prev > 0 ? prev - 1 : options.length - 1));
|
|
68
|
-
}
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
const handleClickOutside = () => {
|
|
73
|
-
setIsOpen(false);
|
|
74
|
-
setActiveIndex(-1);
|
|
75
|
-
};
|
|
76
|
-
(0, react_1.useEffect)(() => {
|
|
77
|
-
if (isOpen && selectRef.current) {
|
|
78
|
-
const selectRect = selectRef.current.getBoundingClientRect();
|
|
79
|
-
const viewportHeight = window.innerHeight;
|
|
80
|
-
const dropdownHeight = Math.min(400, options.length * 60);
|
|
81
|
-
const spaceAbove = selectRect.top;
|
|
82
|
-
const spaceBelow = viewportHeight - selectRect.bottom;
|
|
83
|
-
if (spaceAbove < dropdownHeight && spaceBelow > spaceAbove) {
|
|
84
|
-
setDropdownDirection('down');
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
setDropdownDirection('up');
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}, [isOpen, options.length]);
|
|
91
|
-
(0, react_1.useEffect)(() => {
|
|
92
|
-
if (isOpen && activeIndex >= 0 && dropdownRef.current) {
|
|
93
|
-
const activeElement = dropdownRef.current.children[activeIndex];
|
|
94
|
-
if (activeElement) {
|
|
95
|
-
activeElement.scrollIntoView({
|
|
96
|
-
behavior: 'smooth',
|
|
97
|
-
block: 'nearest',
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
}, [isOpen, activeIndex]);
|
|
102
|
-
return (react_1.default.createElement(click_outside_1.ClickOutside, { onOutsideClick: handleClickOutside },
|
|
103
|
-
react_1.default.createElement("div", { ref: selectRef, className: (0, classnames_1.default)(mention_select_module_less_1.default.mention_select, mention_select_module_less_1.default[`size_${size}`], {
|
|
104
|
-
[mention_select_module_less_1.default.disabled]: disabled,
|
|
105
|
-
[mention_select_module_less_1.default.open]: isOpen,
|
|
106
|
-
[mention_select_module_less_1.default.dropdown_up]: dropdownDirection === 'up',
|
|
107
|
-
[mention_select_module_less_1.default.dropdown_down]: dropdownDirection === 'down',
|
|
108
|
-
}, className), onClick: handleToggle, onKeyDown: handleKeyDown, tabIndex: disabled ? -1 : 0, role: 'combobox', "aria-expanded": isOpen, "aria-haspopup": 'listbox' },
|
|
109
|
-
react_1.default.createElement("div", { className: mention_select_module_less_1.default.select_trigger },
|
|
110
|
-
react_1.default.createElement("div", { className: mention_select_module_less_1.default.select_content }, selectedOption ? (react_1.default.createElement("div", { className: mention_select_module_less_1.default.selected_option },
|
|
111
|
-
react_1.default.createElement("span", { className: mention_select_module_less_1.default.option_label }, selectedOption.label),
|
|
112
|
-
selectedOption.badge && (react_1.default.createElement("span", { className: mention_select_module_less_1.default.option_badge, style: { backgroundColor: selectedOption.badgeColor } }, selectedOption.badge)))) : (react_1.default.createElement("span", { className: mention_select_module_less_1.default.placeholder }, placeholder))),
|
|
113
|
-
react_1.default.createElement(components_1.Icon, { iconClass: (0, components_1.getIcon)('down-arrow'), className: (0, classnames_1.default)(mention_select_module_less_1.default.dropdown_arrow, {
|
|
114
|
-
[mention_select_module_less_1.default.open]: isOpen,
|
|
115
|
-
}) })),
|
|
116
|
-
isOpen && (react_1.default.createElement("div", { ref: dropdownRef, className: mention_select_module_less_1.default.dropdown, role: 'listbox' },
|
|
117
|
-
showThinking && onThinkingChange && (react_1.default.createElement("div", { className: mention_select_module_less_1.default.thinking_section },
|
|
118
|
-
react_1.default.createElement(ThinkingToggle, { enabled: thinkingEnabled, onChange: onThinkingChange }),
|
|
119
|
-
react_1.default.createElement("div", { className: mention_select_module_less_1.default.divider }))),
|
|
120
|
-
options.map((option, index) => (react_1.default.createElement("div", { key: option.value, className: (0, classnames_1.default)(mention_select_module_less_1.default.option, {
|
|
121
|
-
[mention_select_module_less_1.default.active]: index === activeIndex,
|
|
122
|
-
[mention_select_module_less_1.default.selected]: option.selected || option.value === value,
|
|
123
|
-
[mention_select_module_less_1.default.disabled]: option.disabled,
|
|
124
|
-
}), onClick: () => handleSelect(option), role: 'option', "aria-selected": option.selected || option.value === value },
|
|
125
|
-
react_1.default.createElement("div", { className: mention_select_module_less_1.default.option_main },
|
|
126
|
-
react_1.default.createElement("div", { className: mention_select_module_less_1.default.option_header },
|
|
127
|
-
react_1.default.createElement("div", { className: mention_select_module_less_1.default.option_title },
|
|
128
|
-
option.icon && react_1.default.createElement(components_1.Icon, { icon: option.icon, className: mention_select_module_less_1.default.option_icon }),
|
|
129
|
-
option.iconClass && react_1.default.createElement(components_1.Icon, { iconClass: option.iconClass, className: mention_select_module_less_1.default.option_icon }),
|
|
130
|
-
react_1.default.createElement("span", { className: mention_select_module_less_1.default.option_label }, option.label),
|
|
131
|
-
option.badge && (react_1.default.createElement("span", { className: mention_select_module_less_1.default.option_badge, style: { backgroundColor: option.badgeColor } }, option.badge)))),
|
|
132
|
-
option.description && react_1.default.createElement("div", { className: mention_select_module_less_1.default.option_description }, option.description),
|
|
133
|
-
option.tags && option.tags.length > 0 && (react_1.default.createElement("div", { className: mention_select_module_less_1.default.option_tags }, option.tags.map((tag, idx) => (react_1.default.createElement("span", { key: idx, className: mention_select_module_less_1.default.tag }, tag))))))))))))));
|
|
134
|
-
};
|
|
135
|
-
exports.MentionSelect = MentionSelect;
|
|
136
|
-
//# sourceMappingURL=mention-select.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mention-select.js","sourceRoot":"","sources":["../../../../src/browser/components/mention-input/mention-select.tsx"],"names":[],"mappings":";;;;A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