finish 0.1.10
This commit is contained in:
parent
63fb5d3494
commit
bde80bc3b7
@ -9,6 +9,7 @@
|
|||||||
- 实现 issue#49,工具模块,调试希望支持markdown渲染回显。 https://picx.zhimg.com/80/v2-5d708ccab00f33fdf63a656a0066bf23_1440w.png
|
- 实现 issue#49,工具模块,调试希望支持markdown渲染回显。 https://picx.zhimg.com/80/v2-5d708ccab00f33fdf63a656a0066bf23_1440w.png
|
||||||
- 实现 issue#54,右击服务器列表名,可以重命名服务器。 https://picx.zhimg.com/80/v2-87c2a29abdd2dd56a4d18cc4a8b946ff_1440w.png
|
- 实现 issue#54,右击服务器列表名,可以重命名服务器。 https://picx.zhimg.com/80/v2-87c2a29abdd2dd56a4d18cc4a8b946ff_1440w.png
|
||||||
- 修复 resources 和 prompts 有关热更新的一些问题。
|
- 修复 resources 和 prompts 有关热更新的一些问题。
|
||||||
|
- 更新 vscode 创建的标签栏的标题。 https://picx.zhimg.com/80/v2-4d40c20f3eaa032573e4de58298c859f_1440w.png
|
||||||
|
|
||||||
## [main] 0.1.9
|
## [main] 0.1.9
|
||||||
- 增加 mook 功能:可以利用随机种子或者AI生成来自动化填充测试 tool 的表单数据
|
- 增加 mook 功能:可以利用随机种子或者AI生成来自动化填充测试 tool 的表单数据
|
||||||
|
@ -69,6 +69,12 @@ export async function changeInstalledConnectionName(item: McpOptions[] | McpOpti
|
|||||||
// 获取已安装的连接配置
|
// 获取已安装的连接配置
|
||||||
const installedConnection = getConnectionConfig();
|
const installedConnection = getConnectionConfig();
|
||||||
|
|
||||||
|
// 更新 panel 标题
|
||||||
|
if (masterNode.name && panels.has(masterNode.name)) {
|
||||||
|
const panel = panels.get(masterNode.name)!;
|
||||||
|
panel.title = 'OpenMCP ' + newName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
// 更新连接名称
|
// 更新连接名称
|
||||||
masterNode.name = newName.trim();
|
masterNode.name = newName.trim();
|
||||||
masterNode.rename = true;
|
masterNode.rename = true;
|
||||||
|
@ -76,12 +76,16 @@ export async function changeUserConnectionName(item: McpOptions[] | McpOptions)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 更新 panel 标题
|
||||||
|
if (masterNode.name && panels.has(masterNode.name)) {
|
||||||
|
const panel = panels.get(masterNode.name)!;
|
||||||
|
panel.title = 'OpenMCP ' + newName.trim();
|
||||||
|
}
|
||||||
|
|
||||||
// 更新连接名称
|
// 更新连接名称
|
||||||
masterNode.name = newName.trim();
|
masterNode.name = newName.trim();
|
||||||
masterNode.rename = true;
|
masterNode.rename = true;
|
||||||
|
|
||||||
vscode.window.showInformationMessage('enter here');
|
|
||||||
|
|
||||||
// 保存更新后的配置
|
// 保存更新后的配置
|
||||||
const workspacePath = getWorkspacePath();
|
const workspacePath = getWorkspacePath();
|
||||||
saveWorkspaceConnectionConfig(workspacePath);
|
saveWorkspaceConnectionConfig(workspacePath);
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import * as vscode from 'vscode';
|
import * as vscode from 'vscode';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as fspath from 'path';
|
import * as fspath from 'path';
|
||||||
import { ConnectionType, exportFile, McpOptions, panels, updateInstalledConnectionConfig, updateWorkspaceConnectionConfig } from '../global.js';
|
import { ConnectionType, detachMcpOptionAsItem, exportFile, McpOptions, panels, updateInstalledConnectionConfig, updateWorkspaceConnectionConfig } from '../global.js';
|
||||||
import { routeMessage } from '../../openmcp-sdk/service/index.js';
|
import { routeMessage } from '../../openmcp-sdk/service/index.js';
|
||||||
|
|
||||||
export function getWebviewContent(context: vscode.ExtensionContext, panel: vscode.WebviewPanel): string | undefined {
|
export function getWebviewContent(context: vscode.ExtensionContext, panel: vscode.WebviewPanel): string | undefined {
|
||||||
@ -49,11 +49,14 @@ export function revealOpenMcpWebviewPanel(
|
|||||||
if (itemType === 'STDIO') {
|
if (itemType === 'STDIO') {
|
||||||
item.commandString = [item.command, ...(item.args || [])]?.join(' ');
|
item.commandString = [item.command, ...(item.args || [])]?.join(' ');
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
|
|
||||||
|
const item = detachMcpOptionAsItem(option);
|
||||||
|
const panelTitle = 'OpenMCP ' + item.name;
|
||||||
|
|
||||||
const panel = vscode.window.createWebviewPanel(
|
const panel = vscode.window.createWebviewPanel(
|
||||||
'OpenMCP',
|
'openmcp-webview',
|
||||||
'OpenMCP',
|
panelTitle,
|
||||||
vscode.ViewColumn.One,
|
vscode.ViewColumn.One,
|
||||||
{
|
{
|
||||||
enableScripts: true,
|
enableScripts: true,
|
||||||
@ -64,7 +67,6 @@ export function revealOpenMcpWebviewPanel(
|
|||||||
|
|
||||||
panels.set(panelKey, panel);
|
panels.set(panelKey, panel);
|
||||||
|
|
||||||
|
|
||||||
// 设置HTML内容
|
// 设置HTML内容
|
||||||
const html = getWebviewContent(context, panel);
|
const html = getWebviewContent(context, panel);
|
||||||
panel.webview.html = html || '';
|
panel.webview.html = html || '';
|
||||||
@ -163,7 +165,7 @@ export function revealOpenMcpNewsWebviewPanel(
|
|||||||
) {
|
) {
|
||||||
|
|
||||||
const panel = vscode.window.createWebviewPanel(
|
const panel = vscode.window.createWebviewPanel(
|
||||||
'What\'s new in OpenMCP',
|
'openmcp-whatnews',
|
||||||
'What\'s new in OpenMCP',
|
'What\'s new in OpenMCP',
|
||||||
vscode.ViewColumn.One,
|
vscode.ViewColumn.One,
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user