add news page
This commit is contained in:
parent
b3ce96c77d
commit
30937087dd
@ -14,6 +14,7 @@ vsc-extension-quickstart.md
|
|||||||
**/.vscode-test.*
|
**/.vscode-test.*
|
||||||
renderer/**
|
renderer/**
|
||||||
service/**
|
service/**
|
||||||
|
news/**
|
||||||
test/**
|
test/**
|
||||||
servers/**
|
servers/**
|
||||||
scripts/**
|
scripts/**
|
||||||
|
@ -5,7 +5,7 @@ import OmMoreFeature from './components/MoreFeature.vue';
|
|||||||
import OmCoreFeature from './components/CoreFeature.vue';
|
import OmCoreFeature from './components/CoreFeature.vue';
|
||||||
import OmSponsor from './components/Sponsor.vue';
|
import OmSponsor from './components/Sponsor.vue';
|
||||||
import OmResource from './components/Resource.vue';
|
import OmResource from './components/Resource.vue';
|
||||||
import OmTroubleshoot from './components/Troubleshoot.vue';
|
import OmTroubleshoot from './components/Trouble.vue';
|
||||||
|
|
||||||
import data from './data.json';
|
import data from './data.json';
|
||||||
|
|
||||||
|
File diff suppressed because one or more lines are too long
@ -40,4 +40,7 @@ export class HookController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -150,3 +150,36 @@ export function getDefaultLanunchSignature(path: string, cwd: string) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function revealOpenMcpWebviewPanel(
|
||||||
|
context: vscode.ExtensionContext,
|
||||||
|
) {
|
||||||
|
|
||||||
|
const panel = vscode.window.createWebviewPanel(
|
||||||
|
'What\'s new in OpenMCP',
|
||||||
|
'What\'s new in OpenMCP',
|
||||||
|
vscode.ViewColumn.One,
|
||||||
|
{
|
||||||
|
enableScripts: true,
|
||||||
|
retainContextWhenHidden: true,
|
||||||
|
enableFindWidget: true
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
// 设置HTML内容
|
||||||
|
const html = getWebviewContent(context, panel);
|
||||||
|
panel.webview.html = html || '';
|
||||||
|
panel.iconPath = vscode.Uri.file(fspath.join(context.extensionPath, 'openmcp-sdk', 'renderer', 'images', 'openmcp.png'));
|
||||||
|
|
||||||
|
panel.onDidDispose(async () => {
|
||||||
|
// 删除
|
||||||
|
panels.delete(panelKey);
|
||||||
|
|
||||||
|
// TODO: 通过引用计数器关闭后端的 clientMap
|
||||||
|
|
||||||
|
// 退出
|
||||||
|
panel.dispose();
|
||||||
|
});
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user