mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-10 05:53:19 +08:00
Register settings via installSettingsSection for shipped dsh.
SettingsProvider.installSection is not on 0.1.1-rc.2; without the standalone helper the netxops namespace never appears on the Plugins tab. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
99ded2fe2d
commit
ca91031fd0
3 changed files with 20 additions and 19 deletions
17
lib/index.js
17
lib/index.js
|
|
@ -1,6 +1,7 @@
|
|||
// src/index.ts
|
||||
import z from "@deepseek-ai/schemastery";
|
||||
import { credentialRef } from "@deepseek-ai/dsh-credentials";
|
||||
import { installSettingsSection } from "@deepseek-ai/dsh-settings";
|
||||
import * as McpClient from "@deepseek-ai/dsh-mcp-client";
|
||||
var name = "netxops";
|
||||
var inject = ["tools"];
|
||||
|
|
@ -69,15 +70,13 @@ function apply(ctx, config = Config2({})) {
|
|||
});
|
||||
};
|
||||
remount();
|
||||
ctx.inject(["settings"], (settingsCtx) => {
|
||||
settingsCtx.settings.installSection(ctx, NETXOPS_SETTINGS_NAMESPACE, Config2, config, {
|
||||
setSource: (current) => {
|
||||
source = current;
|
||||
},
|
||||
onChange: () => {
|
||||
remount();
|
||||
}
|
||||
});
|
||||
installSettingsSection(ctx, NETXOPS_SETTINGS_NAMESPACE, Config2, config, {
|
||||
setSource: (current) => {
|
||||
source = current;
|
||||
},
|
||||
onChange: () => {
|
||||
remount();
|
||||
}
|
||||
});
|
||||
ctx.on("credentials/reference-updated", (ref) => {
|
||||
if (String(ref) === source().tokenCredentialRef)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue