fix bug of saving
This commit is contained in:
parent
e4e626cd4e
commit
6ab0c789b4
@ -8,6 +8,7 @@
|
|||||||
- 解决 issue#21 最后一个标签页关闭并恢复默认页面。
|
- 解决 issue#21 最后一个标签页关闭并恢复默认页面。
|
||||||
- 解决 issue#22 工具模块UI异常,现在 openmcp 支持解析 pydantic 进行 typing 的 python mcp 了。
|
- 解决 issue#22 工具模块UI异常,现在 openmcp 支持解析 pydantic 进行 typing 的 python mcp 了。
|
||||||
- 优化对象输入框,现在对象输入框具有语法高亮和受限度的自动补全了。
|
- 优化对象输入框,现在对象输入框具有语法高亮和受限度的自动补全了。
|
||||||
|
- 对于 trae 的所有默认主题进行额外支持。
|
||||||
|
|
||||||
## [main] 0.1.1
|
## [main] 0.1.1
|
||||||
- 修复 SSH 连接 Ubuntu 的情况下的部分 bug
|
- 修复 SSH 连接 Ubuntu 的情况下的部分 bug
|
||||||
|
@ -176,9 +176,10 @@ export class MacroColor {
|
|||||||
// 额外支持 trae 的默认主题
|
// 额外支持 trae 的默认主题
|
||||||
const sidebarColorString = this.rootStyles.getPropertyValue('--sidebar');
|
const sidebarColorString = this.rootStyles.getPropertyValue('--sidebar');
|
||||||
if (sidebarColorString === backgroundColorString) {
|
if (sidebarColorString === backgroundColorString) {
|
||||||
|
// trae 默认主题的特点:sidebarColorString 和 backgroundColorString 一样
|
||||||
|
// 把 默认主题的特点:sidebarColorString 的颜色加深一些
|
||||||
const newSidebarColor = this.theme === 'dark' ? '#252a38' : '#edeff2';
|
const newSidebarColor = this.theme === 'dark' ? '#252a38' : '#edeff2';
|
||||||
document.documentElement.style.setProperty('--sidebar', newSidebarColor);
|
document.documentElement.style.setProperty('--sidebar', 'var(--vscode-icube-colorBg2)');
|
||||||
pinkLog('修改 sidebar 颜色为' + newSidebarColor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -68,6 +68,19 @@ export function getConnectionConfig() {
|
|||||||
let connection;
|
let connection;
|
||||||
try {
|
try {
|
||||||
connection = JSON.parse(rawConnectionString) as IConnectionConfig;
|
connection = JSON.parse(rawConnectionString) as IConnectionConfig;
|
||||||
|
|
||||||
|
// 对连接信息进行校验
|
||||||
|
if (!connection.items) {
|
||||||
|
connection = { items: [] };
|
||||||
|
}
|
||||||
|
|
||||||
|
connection.items = connection.items.filter(item => {
|
||||||
|
if (Array.isArray(item) && item.length === 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
connection = { items: [] };
|
connection = { items: [] };
|
||||||
}
|
}
|
||||||
@ -110,6 +123,19 @@ export function getWorkspaceConnectionConfig() {
|
|||||||
let connection;
|
let connection;
|
||||||
try {
|
try {
|
||||||
connection = JSON.parse(rawConnectionString) as IConnectionConfig;
|
connection = JSON.parse(rawConnectionString) as IConnectionConfig;
|
||||||
|
|
||||||
|
// 对连接信息进行校验
|
||||||
|
if (!connection.items) {
|
||||||
|
connection = { items: [] };
|
||||||
|
}
|
||||||
|
|
||||||
|
connection.items = connection.items.filter(item => {
|
||||||
|
if (Array.isArray(item) && item.length === 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
connection = { items: [] };
|
connection = { items: [] };
|
||||||
}
|
}
|
||||||
|
@ -51,7 +51,7 @@ export class McpWorkspaceConnectProvider implements vscode.TreeDataProvider<Conn
|
|||||||
|
|
||||||
const item = await acquireUserCustomConnection();
|
const item = await acquireUserCustomConnection();
|
||||||
|
|
||||||
if (!item) {
|
if (item.length === 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user