dsh-plugin-effort-declare 0.1.3 → 0.1.5

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.
Files changed (48) hide show
  1. package/CONTRIBUTING.en.md +20 -10
  2. package/CONTRIBUTING.md +23 -13
  3. package/INSTALL.en.md +9 -9
  4. package/INSTALL.md +16 -16
  5. package/README.en.md +27 -21
  6. package/README.md +30 -24
  7. package/lib/client.js +142 -61
  8. package/lib/client.js.map +1 -1
  9. package/lib/types/client/EffortDeclareSection.d.ts +5 -4
  10. package/lib/types/client/EffortDeclareSection.d.ts.map +1 -1
  11. package/lib/types/client/index.d.ts +23 -2
  12. package/lib/types/client/index.d.ts.map +1 -1
  13. package/lib/types/client/load-drafts.d.ts +3 -3
  14. package/lib/types/client/load-drafts.d.ts.map +1 -1
  15. package/lib/types/client/locales.d.ts +1 -1
  16. package/lib/types/client/locales.d.ts.map +1 -1
  17. package/lib/types/client/remotes.d.ts +40 -0
  18. package/lib/types/client/remotes.d.ts.map +1 -0
  19. package/lib/types/core/catalog.d.ts +11 -3
  20. package/lib/types/core/catalog.d.ts.map +1 -1
  21. package/lib/types/core/drafts.d.ts +9 -5
  22. package/lib/types/core/drafts.d.ts.map +1 -1
  23. package/lib/types/core/filter.d.ts +1 -1
  24. package/lib/types/core/filter.d.ts.map +1 -1
  25. package/lib/types/core/input.d.ts +15 -0
  26. package/lib/types/core/input.d.ts.map +1 -0
  27. package/lib/types/core/path-ops.d.ts +1 -1
  28. package/lib/types/core/path-ops.d.ts.map +1 -1
  29. package/lib/types/core/validate.d.ts +3 -0
  30. package/lib/types/core/validate.d.ts.map +1 -1
  31. package/package.json +10 -13
  32. package/src/README.en.md +2 -2
  33. package/src/README.md +2 -2
  34. package/src/client/EffortDeclareSection.tsx +36 -26
  35. package/src/client/README.en.md +8 -7
  36. package/src/client/README.md +8 -7
  37. package/src/client/index.ts +35 -6
  38. package/src/client/load-drafts.ts +10 -10
  39. package/src/client/locales.ts +15 -6
  40. package/src/client/remotes.ts +39 -0
  41. package/src/core/README.en.md +8 -7
  42. package/src/core/README.md +8 -7
  43. package/src/core/catalog.ts +14 -2
  44. package/src/core/drafts.ts +41 -27
  45. package/src/core/filter.ts +1 -1
  46. package/src/core/input.ts +49 -0
  47. package/src/core/path-ops.ts +1 -1
  48. package/src/core/validate.ts +8 -0
@@ -2,7 +2,8 @@
2
2
  * dsh-plugin-effort-declare — browser half: settings.section for per-model
3
3
  * reasoning effort declarations.
4
4
  */
5
- import type { ClientContext } from '@deepseek-ai/dsh-client-runtime/client';
5
+ import type { Context } from '@deepseek-ai/cordis';
6
+ import type { SlotCore } from '@deepseek-ai/dsh-client-ui-slots';
6
7
  import { type EffortDeclareKey } from './locales.ts';
7
8
  declare module '@deepseek-ai/dsh-client-ui-slots' {
8
9
  interface LocaleNamespaceMap {
@@ -10,6 +11,26 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
10
11
  'plugin-effort-declare': EffortDeclareKey;
11
12
  }
12
13
  }
14
+ /**
15
+ * `slots` and `connection/reset` are provided by the unpublished
16
+ * dsh-client-runtime wrapper. 0.1.2-alpha.2 did not publish that package;
17
+ * the shapes match the official models page and SlotCore.
18
+ */
19
+ declare module '@deepseek-ai/cordis' {
20
+ interface Events {
21
+ /**
22
+ * A connection generation was (re-)established. Wire-derived caches must
23
+ * treat their state as stale and repull.
24
+ * @mode emit
25
+ */
26
+ 'connection/reset'(): void;
27
+ }
28
+ interface Context {
29
+ slots: SlotCore & {
30
+ inject(name: string, factory: () => unknown): unknown;
31
+ };
32
+ }
33
+ }
13
34
  export declare const inject: string[];
14
- export declare function apply(ctx: ClientContext): void;
35
+ export declare function apply(ctx: Context): void;
15
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAS3E,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGhE,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,4CAA4C;QAC5C,uBAAuB,EAAE,gBAAgB,CAAA;KAC1C;CACF;AAED,eAAO,MAAM,MAAM,UAAiF,CAAA;AAkBpG,wBAAgB,KAAK,CAAC,GAAG,EAAE,aAAa,GAAG,IAAI,CAgE9C"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAKhE,OAAO,EAAc,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAGhE,OAAO,QAAQ,kCAAkC,CAAC;IAChD,UAAU,kBAAkB;QAC1B,4CAA4C;QAC5C,uBAAuB,EAAE,gBAAgB,CAAA;KAC1C;CACF;AAED;;;;GAIG;AACH,OAAO,QAAQ,qBAAqB,CAAC;IACnC,UAAU,MAAM;QACd;;;;WAIG;QACH,kBAAkB,IAAI,IAAI,CAAA;KAC3B;IACD,UAAU,OAAO;QACf,KAAK,EAAE,QAAQ,GAAG;YAChB,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,OAAO,GAAG,OAAO,CAAA;SACtD,CAAA;KACF;CACF;AAED,eAAO,MAAM,MAAM,UAQlB,CAAA;AAkBD,wBAAgB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,IAAI,CAgExC"}
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Load editable route drafts from llm.providers + the llm-pi-ai namespace.
2
+ * Load editable route drafts from llm.listConfigurableProviders + the llm-pi-ai namespace.
3
3
  * Drafts come from the user layer; route protocol classification may use effective value.
4
4
  *
5
5
  * First paint uses `ensure()` (idle-only). Refresh never calls `ensure()`:
@@ -8,8 +8,8 @@
8
8
  * by revision (including older delayed echoes), not ignored as a generic
9
9
  * document-updated.
10
10
  */
11
- import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client';
12
11
  import type { SettingsDescribeFace } from '@deepseek-ai/dsh-client-ui-settings/client';
12
+ import type { LlmDirectoryRemote } from './remotes.ts';
13
13
  import { type RouteDraft } from '../core/drafts.ts';
14
14
  import type { SchemaOps } from './schema-ops.ts';
15
15
  export interface LoadDraftsResult {
@@ -48,6 +48,6 @@ export declare function waitForNamespaceRevisionChange(describe: MirrorDescribe,
48
48
  * `ensure`: first paint / idle recovery (official ensure only reads from idle).
49
49
  * `snapshot`: refresh after the mirror revision already moved — do not ensure.
50
50
  */
51
- export declare function loadDrafts(api: Pick<IApiClient, 'llm'>, describe: Pick<SettingsDescribeFace, 'ensure' | 'getSnapshot'>, schema: SchemaOps, mode?: LoadDraftsMode): Promise<LoadDraftsResult>;
51
+ export declare function loadDrafts(llm: LlmDirectoryRemote, describe: Pick<SettingsDescribeFace, 'ensure' | 'getSnapshot'>, schema: SchemaOps, mode?: LoadDraftsMode): Promise<LoadDraftsResult>;
52
52
  export {};
53
53
  //# sourceMappingURL=load-drafts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"load-drafts.d.ts","sourceRoot":"","sources":["../../../src/client/load-drafts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,EAAE,UAAU,EAAyB,MAAM,qCAAqC,CAAA;AAC5F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AAKtF,OAAO,EAA6B,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAG9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAOhD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAA;IACjB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,MAAM,EAAE,UAAU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AC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAC1D,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,EAC1B,IAAI,EAAE;IACJ,UAAU,EAAE,SAAS,MAAM,EAAE,CAAA;IAC7B,cAAc,EAAE,CAAC,CAAA;IACjB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAA;CACjC,GACA,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAcnB;AA4BD,qFAAqF;AACrF,wBAAsB,wBAAwB,CAC5C,QAAQ,EAAE,cAAc,EACxB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAUhC;AAED,6EAA6E;AAC7E,wBAAsB,8BAA8B,CAClD,QAAQ,EAAE,cAAc,EACxB,EAAE,EAAE,MAAM,EACV,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,SAAS,GAAG,SAAS,CAAC,CAMhC;AAqDD;;;GAGG;AACH,wBAAsB,UAAU,CAC9B,GAAG,EAAE,kBAAkB,EACvB,QAAQ,EAAE,IAAI,CAAC,oBAAoB,EAAE,QAAQ,GAAG,aAAa,CAAC,EAC9D,MAAM,EAAE,SAAS,EACjB,IAAI,GAAE,cAAyB,GAC9B,OAAO,CAAC,gBAAgB,CAAC,CAG3B"}
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Dictionary namespace for the effort-declare settings section.
3
3
  */
4
- export type EffortDeclareKey = 'nav' | 'title' | 'intro' | 'empty' | 'emptyHint' | 'loadError' | 'loading' | 'readOnly' | 'save' | 'saving' | 'saveBusy' | 'cancel' | 'saved' | 'conflict' | 'dirtyConflict' | 'presets' | 'presetDeepSeek' | 'presetOpenAI' | 'presetToggle' | 'presetToggleWarn' | 'model' | 'levels' | 'wire' | 'offMode' | 'offAbsent' | 'offEmpty' | 'offValue' | 'offValuePlaceholder' | 'clear' | 'advanced' | 'thinkingFormat' | 'thinkingFormatDefault' | 'supportsDeveloperRole' | 'supportsReasoningEffort' | 'developerTrueHint' | 'compatSummary' | 'errorEmpty' | 'errorOffOnly' | 'errorBadWire' | 'noModels' | 'reload';
4
+ export type EffortDeclareKey = 'nav' | 'title' | 'intro' | 'empty' | 'emptyHint' | 'loadError' | 'loading' | 'readOnly' | 'save' | 'saving' | 'saveBusy' | 'cancel' | 'saved' | 'conflict' | 'dirtyConflict' | 'presets' | 'presetDeepSeek' | 'presetOpenAI' | 'presetToggle' | 'presetToggleWarn' | 'model' | 'levels' | 'wire' | 'offMode' | 'offAbsent' | 'offEmpty' | 'offValue' | 'offValuePlaceholder' | 'clear' | 'advanced' | 'thinkingFormat' | 'thinkingFormatDefault' | 'supportsDeveloperRole' | 'supportsReasoningEffort' | 'developerTrueHint' | 'compatSummary' | 'errorEmpty' | 'errorOffOnly' | 'errorBadWire' | 'noModels' | 'reload' | 'imageInput' | 'imageInputHint' | 'errorBadInput';
5
5
  export declare const NS = "plugin-effort-declare";
6
6
  export declare const zh: Record<EffortDeclareKey, string>;
7
7
  export declare const en: Record<EffortDeclareKey, string>;
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,WAAW,GACX,SAAS,GACT,UAAU,GACV,MAAM,GACN,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,UAAU,GACV,eAAe,GACf,SAAS,GACT,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,OAAO,GACP,UAAU,GACV,gBAAgB,GAChB,uBAAuB,GACvB,uBAAuB,GACvB,yBAAyB,GACzB,mBAAmB,GACnB,eAAe,GACf,YAAY,GACZ,cAAc,GACd,cAAc,GACd,UAAU,GACV,QAAQ,CAAA;AAEZ,eAAO,MAAM,EAAE,0BAA0B,CAAA;AAEzC,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CA0C/C,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CA0C/C,CAAA"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../src/client/locales.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,gBAAgB,GACxB,KAAK,GACL,OAAO,GACP,OAAO,GACP,OAAO,GACP,WAAW,GACX,WAAW,GACX,SAAS,GACT,UAAU,GACV,MAAM,GACN,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,UAAU,GACV,eAAe,GACf,SAAS,GACT,gBAAgB,GAChB,cAAc,GACd,cAAc,GACd,kBAAkB,GAClB,OAAO,GACP,QAAQ,GACR,MAAM,GACN,SAAS,GACT,WAAW,GACX,UAAU,GACV,UAAU,GACV,qBAAqB,GACrB,OAAO,GACP,UAAU,GACV,gBAAgB,GAChB,uBAAuB,GACvB,uBAAuB,GACvB,yBAAyB,GACzB,mBAAmB,GACnB,eAAe,GACf,YAAY,GACZ,cAAc,GACd,cAAc,GACd,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,gBAAgB,GAChB,eAAe,CAAA;AAEnB,eAAO,MAAM,EAAE,0BAA0B,CAAA;AAEzC,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CA6C/C,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CA6C/C,CAAA"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Client Remote faces this page actually calls (DSH 0.1.2).
3
+ * Shapes match the generated Host descriptors, not the removed IApiClient.
4
+ */
5
+ import type { SettingsDescribeFace } from '@deepseek-ai/dsh-client-ui-settings/client';
6
+ import type { ProviderDirectoryEntry } from '../core/filter.ts';
7
+ import type { PathOp } from '../core/path-ops.ts';
8
+ /** Gateway envelope for a successful Remote call. */
9
+ export type RemoteOk<T> = {
10
+ ok: true;
11
+ value: T;
12
+ };
13
+ /** Gateway envelope for a failed Remote call. */
14
+ export type RemoteErr = {
15
+ ok: false;
16
+ error: {
17
+ code: string;
18
+ message: string;
19
+ };
20
+ };
21
+ export type RemoteResult<T> = RemoteOk<T> | RemoteErr;
22
+ /**
23
+ * `llm.listConfigurableProviders` — generated
24
+ * `@deepseek-ai/dsh-llm#llm/listConfigurableProviders`.
25
+ * `value` is the directory array (no `{ providers }` wrapper).
26
+ */
27
+ export interface LlmDirectoryRemote {
28
+ listConfigurableProviders(): Promise<RemoteResult<readonly ProviderDirectoryEntry[]>>;
29
+ }
30
+ type NamespaceView = Parameters<SettingsDescribeFace['acceptView']>[0];
31
+ /**
32
+ * `settings.mutate` — generated
33
+ * `@deepseek-ai/dsh-api-settings-controller#settings/mutate`.
34
+ * Conflict code is `settings/conflict`.
35
+ */
36
+ export interface SettingsWriteRemote {
37
+ mutate(ns: string, ops: readonly PathOp[], expectedRevision: number | undefined): Promise<RemoteResult<NamespaceView>>;
38
+ }
39
+ export {};
40
+ //# sourceMappingURL=remotes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remotes.d.ts","sourceRoot":"","sources":["../../../src/client/remotes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAA;AACtF,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAA;AAC/D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAEjD,qDAAqD;AACrD,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,CAAA;AAEhD,iDAAiD;AACjD,MAAM,MAAM,SAAS,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAA;CAAE,CAAA;AAE/E,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,SAAS,CAAA;AAErD;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,yBAAyB,IAAI,OAAO,CAAC,YAAY,CAAC,SAAS,sBAAsB,EAAE,CAAC,CAAC,CAAA;CACtF;AAED,KAAK,aAAa,GAAG,UAAU,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AAEtE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,MAAM,CACJ,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,SAAS,MAAM,EAAE,EACtB,gBAAgB,EAAE,MAAM,GAAG,SAAS,GACnC,OAAO,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAA;CACxC"}
@@ -2,7 +2,7 @@
2
2
  * Canonical thinking levels and openai-completions thinkingFormat names.
3
3
  *
4
4
  * Levels match `@deepseek-ai/dsh-llm-pi-ai` catalog.ts `THINKING_LEVELS`.
5
- * Formats match `SUPPORTED_THINKING_FORMATS` in the same file (rc.8).
5
+ * Formats match `SUPPORTED_THINKING_FORMATS` in the same file (0.1.2-alpha.2).
6
6
  * Tests pin these lists against a checked-in schema fixture
7
7
  * (`tests/fixtures/pi-ai-thinking-format-union.ts`) and the local level
8
8
  * whitelist. The settings page never offers the handwritten thinkingFormat
@@ -15,10 +15,10 @@ export type ThinkingLevel = (typeof THINKING_LEVELS)[number];
15
15
  /** Thinking levels other than Off; Off has its own tri-state control. */
16
16
  export declare const THINKING_LEVELS_WITHOUT_OFF: ("minimal" | "low" | "medium" | "high" | "xhigh" | "max")[];
17
17
  /**
18
- * openai-completions thinkingFormat values from llm-pi-ai catalog.ts rc.8.
18
+ * openai-completions thinkingFormat values from llm-pi-ai catalog.ts 0.1.2-alpha.2.
19
19
  * Test pin only — not a writable UI fallback.
20
20
  */
21
- export declare const FALLBACK_THINKING_FORMATS: readonly ["openai", "deepseek", "openrouter", "together", "zai", "qwen", "chat-template", "qwen-chat-template", "string-thinking", "ant-ling"];
21
+ export declare const FALLBACK_THINKING_FORMATS: readonly ["openai", "deepseek", "openrouter", "together", "baseten", "zai", "qwen", "chat-template", "qwen-chat-template", "string-thinking", "ant-ling"];
22
22
  export type ThinkingFormat = (typeof FALLBACK_THINKING_FORMATS)[number];
23
23
  /** Wire protocol this plugin's v1 editor supports. */
24
24
  export declare const OPENAI_COMPLETIONS = "openai-completions";
@@ -30,4 +30,12 @@ export declare const LLM_DEEPSEEK_NS = "llm-deepseek";
30
30
  export declare const DEEPSEEK_OFFICIAL = "deepseek-official";
31
31
  /** Any route key walks a dict schema to the same profile node. */
32
32
  export declare const SCHEMA_PROBE_ROUTE = "\0probe";
33
+ /** Request modalities llm-pi-ai accepts on `models[].input` / `defaultInput`. */
34
+ export declare const INPUT_MODALITIES: readonly ["text", "image"];
35
+ export type InputModality = (typeof INPUT_MODALITIES)[number];
36
+ /**
37
+ * Canonical write for a hand-declared vision model.
38
+ * Must include `text`; image-only is not a serviceable OpenAI-completions route.
39
+ */
40
+ export declare const IMAGE_CAPABLE_INPUT: readonly InputModality[];
33
41
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/core/catalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,8DAA8D;AAC9D,eAAO,MAAM,eAAe,sEAQlB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA;AAE5D,y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,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE7D;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,aAAa,EAAsB,CAAA"}
@@ -2,7 +2,7 @@
2
2
  export interface RouteDraft {
3
3
  provider: string;
4
4
  displayName: string;
5
- /** Path inside the llm-pi-ai section (`llm.providers[].settingsPath`). */
5
+ /** Path inside the llm-pi-ai section (`listConfigurableProviders[].settingsPath`). */
6
6
  settingsPath: readonly string[];
7
7
  /** Namespace revision (one value for the whole llm-pi-ai document). */
8
8
  revision: number;
@@ -34,9 +34,13 @@ export declare function applySaveSuccess(drafts: readonly RouteDraft[], savedPro
34
34
  user: unknown;
35
35
  revision: number;
36
36
  }): RouteDraft[];
37
+ /** Model-row fields this page edits; other keys follow the Models page. */
38
+ export declare const MODEL_OVERLAY_KEYS: readonly ["reasoningEfforts", "input"];
39
+ export type ModelOverlayKey = (typeof MODEL_OVERLAY_KEYS)[number];
37
40
  /**
38
41
  * Membership follows the latest user-layer models list (Models page add/delete).
39
- * Local unsaved `reasoningEfforts` (including a cleared key) overlay by id.
42
+ * Local unsaved overlay keys (including a cleared key) overlay by id; other
43
+ * fields on the row follow incoming.
40
44
  */
41
45
  export declare function mergeModelsById(args: {
42
46
  prevModels: readonly Record<string, unknown>[];
@@ -62,9 +66,9 @@ export declare function mergeCompat(args: {
62
66
  };
63
67
  /**
64
68
  * Apply a freshly loaded table. Membership and metadata follow incoming;
65
- * unsaved reasoningEfforts / dirty compat keys overlay by id. Conflict only
66
- * when a locally dirty field also changed in originals (revision-only bumps
67
- * and sibling-card saves do not warn).
69
+ * unsaved overlay keys (`reasoningEfforts`, `input`) / dirty compat keys
70
+ * overlay by id. Conflict only when a locally dirty field also changed in
71
+ * originals (revision-only bumps and sibling-card saves do not warn).
68
72
  */
69
73
  export declare function mergeLoadedDrafts(current: readonly RouteDraft[], incoming: readonly RouteDraft[], options: {
70
74
  preserveDirty: boolean;
@@ -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;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IAC7B,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAC1C,GAAG;IAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAc3D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,SAAS,UAAU,EAAE,EAC9B,QAAQ,EAAE,SAAS,UAAU,EAAE,EAC/B,OAAO,EAAE;IAAE,aAAa,EAAE,OAAO,CAAA;CAAE,GAClC;IAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAAC,UAAU,EAAE,MAAM,EAAE,CAAA;CAAE,CAgChD;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,MAAM,CAGlE;AAED,6DAA6D;AAC7D,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAE5F;AAED,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAK5F"}
@@ -1,4 +1,4 @@
1
- /** Directory row from `llm.providers()` (the fields v1 filtering reads). */
1
+ /** Directory row from `llm.listConfigurableProviders()` (the fields v1 filtering reads). */
2
2
  export interface ProviderDirectoryEntry {
3
3
  provider: string;
4
4
  displayName?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/core/filter.ts"],"names":[],"mappings":"AAQA,4EAA4E;AAC5E,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,CAMR;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,WAAW,GAAG,mBAAmB,GAAG,SAAS,GAAG,iBAAiB,CAAA;CAC3E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,gBAAgB,CAAC,EAAE,MAAM,GACxB,gBAAgB,CAelB;AAED,6EAA6E;AAC7E,wBAAgB,SAAS,CACvB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC3C,QAAQ,EAAE,MAAM,GACf,OAAO,CAKT;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAK1D"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../../src/core/filter.ts"],"names":[],"mappings":"AAQA,4FAA4F;AAC5F,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IAChC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,OAAO,EAChB,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,MAAM,CAMR;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,WAAW,GAAG,mBAAmB,GAAG,SAAS,GAAG,iBAAiB,CAAA;CAC3E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,OAAO,EAChB,gBAAgB,CAAC,EAAE,MAAM,GACxB,gBAAgB,CAelB;AAED,6EAA6E;AAC7E,wBAAgB,SAAS,CACvB,OAAO,EAAE,OAAO,EAChB,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC3C,QAAQ,EAAE,MAAM,GACf,OAAO,CAKT;AAED,sEAAsE;AACtE,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,EAAE,CAK1D"}
@@ -0,0 +1,15 @@
1
+ /** Whether the stored `input` list includes image. Absence is false. */
2
+ export declare function readImageCapable(row: Record<string, unknown>): boolean;
3
+ /**
4
+ * Declare or drop image input on a spread row.
5
+ * Enabled writes `[text, image]`; disabled unsets the key (not `[]`, not `[text]`).
6
+ */
7
+ export declare function writeImageCapable(row: Record<string, unknown>, enabled: boolean): Record<string, unknown>;
8
+ /**
9
+ * Validate a stored `input` field. Returns an error code; never throws.
10
+ * Absence is valid. Empty list is rejected so a bad stamp cannot be re-saved.
11
+ */
12
+ export declare function validateInput(input: unknown): 'bad-input' | undefined;
13
+ /** Per-model client-side check used to show errors without throwing. */
14
+ export declare function modelInputError(row: Record<string, unknown>): 'bad-input' | undefined;
15
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/core/input.ts"],"names":[],"mappings":"AAOA,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAGtE;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,OAAO,EAAE,OAAO,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKzB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CAWrE;AAED,wEAAwE;AACxE,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,WAAW,GAAG,SAAS,CAGrF"}
@@ -18,7 +18,7 @@ export type PathOp = {
18
18
  */
19
19
  export declare function pathOps(base: readonly string[], before: unknown, after: Record<string, unknown>): PathOp[];
20
20
  export interface SaveSlices {
21
- /** Profile path from `llm.providers[].settingsPath` (not a hardcoded route id). */
21
+ /** Profile path from `listConfigurableProviders[].settingsPath` (not a hardcoded route id). */
22
22
  settingsPath: readonly string[];
23
23
  /** Models array before the edit (user layer). */
24
24
  beforeModels: unknown;
@@ -1 +1 @@
1
- {"version":3,"file":"path-ops.d.ts","sourceRoot":"","sources":["../../../src/core/path-ops.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,MAAM,MAAM,GACd;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC7C;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,IAAI,EAAE,MAAM,EAAE,CAAA;CAAE,CAAA;AAEnC;;;;;GAKG;AACH,wBAAgB,OAAO,CACrB,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,MAAM,CAAC,M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AAA;CACjD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,CAUzD"}
@@ -1,3 +1,6 @@
1
+ export type ModelRowError = 'empty' | 'off-only' | 'bad-wire' | 'bad-input';
1
2
  /** Per-model client-side check used to show errors without throwing. */
2
3
  export declare function modelEffortError(row: Record<string, unknown>): 'empty' | 'off-only' | 'bad-wire' | undefined;
4
+ /** First blocking error on a model row (efforts, then input). */
5
+ export declare function modelRowError(row: Record<string, unknown>): ModelRowError | undefined;
3
6
  //# sourceMappingURL=validate.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/core/validate.ts"],"names":[],"mappings":"AAEA,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAG5G"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../../src/core/validate.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAA;AAE3E,wEAAwE;AACxE,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,CAG5G;AAED,iEAAiE;AACjE,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,aAAa,GAAG,SAAS,CAErF"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-plugin-effort-declare",
3
- "description": "Settings page to declare per-model reasoningEfforts and openai-completions compat on hand-declared llm-pi-ai routes. Writes the official namespace; does not intercept llm/stream or replace the Models page.",
4
- "version": "0.1.3",
3
+ "description": "Declare per-model reasoning efforts, image input, and openai-completions dialect on hand-declared llm-pi-ai routes. Writes the official namespace; does not intercept llm/stream or replace the Models page.",
4
+ "version": "0.1.5",
5
5
  "private": false,
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -33,7 +33,6 @@
33
33
  },
34
34
  "client": {
35
35
  "inject": [
36
- "@deepseek-ai/dsh-client-runtime",
37
36
  "@deepseek-ai/dsh-client-locale",
38
37
  "@deepseek-ai/dsh-client-ui-settings",
39
38
  "@deepseek-ai/dsh-api-remotes"
@@ -42,19 +41,17 @@
42
41
  }
43
42
  },
44
43
  "peerDependencies": {
45
- "@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.8",
46
- "@deepseek-ai/dsh-client-locale": "^0.1.0-rc.8",
47
- "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.8",
48
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.8",
44
+ "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
45
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
46
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
49
47
  "react": "^18.2.0"
50
48
  },
51
49
  "devDependencies": {
52
- "@deepseek-ai/cordis": "^4.0.1",
53
- "@deepseek-ai/dsh-api-remotes": "^0.1.0-rc.8",
54
- "@deepseek-ai/dsh-client-locale": "^0.1.0-rc.8",
55
- "@deepseek-ai/dsh-client-runtime": "^0.1.0-rc.8",
56
- "@deepseek-ai/dsh-client-ui-settings": "^0.1.0-rc.8",
57
- "@deepseek-ai/dsh-client-ui-slots": "^0.1.0-rc.8",
50
+ "@deepseek-ai/cordis": "^4.0.2",
51
+ "@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
52
+ "@deepseek-ai/dsh-client-locale": "^0.1.2-alpha.2",
53
+ "@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
54
+ "@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
58
55
  "@types/node": "^22.20.0",
59
56
  "@types/react": "~18.3.1",
60
57
  "lightningcss": "^1.32.0",
package/src/README.en.md CHANGED
@@ -16,8 +16,8 @@ Install: [INSTALL.en.md](../INSTALL.en.md). Usage: root [README.en.md](../README
16
16
  | Path | Role |
17
17
  | --- | --- |
18
18
  | [`index.ts`](./index.ts) | Host entry. Exports `name` and `apply`. v1 registers no host services or adapters; the bundle still needs this entry so `dsh plugin add` can load the package. |
19
- | [`core/`](./core/) | UI-free pure functions: efforts, presets, save ops, draft merge, route filtering, footer attribution. Shared by the client and tests; the v1 host entry does not import them (`tsconfig.host` still compiles `core` for types). |
20
- | [`client/`](./client/) | Browser half: locale, settings page, `settings.mutate` against `llm-pi-ai`. |
19
+ | [`core/`](./core/) | UI-free pure functions: reasoning efforts, image input, presets, save ops, draft merge, route filtering, footer attribution. Shared by the client and tests; the v1 host entry does not import them (`tsconfig.host` still compiles `core` for types). |
20
+ | [`client/`](./client/) | Browser half: locale, settings page, and official `settings.mutate` against `llm-pi-ai` for `reasoningEfforts` and `input`. |
21
21
  | [`css-modules.d.ts`](./css-modules.d.ts) | Types for `*.module.css` (class map plus `cssText` / `cssTagId`). |
22
22
 
23
23
  `tsconfig.host.json` compiles host + `core`; `tsconfig.client.json` compiles `client` + `core`. Build output lives in [`lib/`](../lib/).
package/src/README.md CHANGED
@@ -16,8 +16,8 @@
16
16
  | 路径 | 说明 |
17
17
  | --- | --- |
18
18
  | [`index.ts`](./index.ts) | Host 入口。导出 `name` 与 `apply`。v1 不注册 host 服务、不挂适配器;组合包仍需要这一入口才能被 `dsh plugin add` 加载。 |
19
- | [`core/`](./core/) | 与 UI 无关的纯函数:档位、预设、保存 ops、草稿合并、路由过滤、页脚归因格式。client 与单测共用;Host 入口 v1 不引用这些函数(`tsconfig.host` 仍编译 `core` 以产出类型)。 |
20
- | [`client/`](./client/) | 浏览器半区:locale、设置页、对 `llm-pi-ai` 的 `settings.mutate`。 |
19
+ | [`core/`](./core/) | 与 UI 无关的纯函数:推理档位、图片输入、预设、保存 ops、草稿合并、路由过滤、页脚归因格式。client 与单测共用;Host 入口 v1 不引用这些函数(`tsconfig.host` 仍编译 `core` 以产出类型)。 |
20
+ | [`client/`](./client/) | 浏览器半区:locale、设置页,经官方 `settings.mutate` 写入 `llm-pi-ai` 的 `reasoningEfforts` 与 `input`。 |
21
21
  | [`css-modules.d.ts`](./css-modules.d.ts) | `*.module.css` 模块类型(class map + `cssText` / `cssTagId`)。 |
22
22
 
23
23
  `tsconfig.host.json` 编译 host + `core`;`tsconfig.client.json` 编译 `client` + `core`。构建产物在 [`lib/`](../lib/)。
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Settings section: per-model reasoningEfforts + openai-completions compat
3
- * for hand-declared llm-pi-ai routes.
2
+ * Settings section: per-model reasoningEfforts, image input, and
3
+ * openai-completions compat for hand-declared llm-pi-ai routes.
4
4
  */
5
5
  import { useCallback, useEffect, useRef, useState, type ReactNode } from 'react'
6
- import type { IApiClient } from '@deepseek-ai/dsh-api-remotes/client'
7
6
  import type { SettingsDescribeFace } from '@deepseek-ai/dsh-client-ui-settings/client'
7
+ import type { LlmDirectoryRemote, SettingsWriteRemote } from './remotes.ts'
8
8
  import { LLM_PI_AI_NS, THINKING_LEVELS_WITHOUT_OFF } from '../core/catalog.ts'
9
9
  import {
10
10
  alignDraft,
@@ -29,7 +29,8 @@ import {
29
29
  import { applyPresetCompat, applyPresetEfforts, PRESETS, type PresetId } from '../core/presets.ts'
30
30
  import { buildSaveOps } from '../core/path-ops.ts'
31
31
  import { cloneModels, cloneObject } from '../core/paths.ts'
32
- import { modelEffortError } from '../core/validate.ts'
32
+ import { readImageCapable, writeImageCapable } from '../core/input.ts'
33
+ import { modelRowError } from '../core/validate.ts'
33
34
  import { PLUGIN_FOOTER_TEXT } from './build-info.ts'
34
35
  import {
35
36
  foldReloadNotices,
@@ -52,7 +53,8 @@ export type Invalidation =
52
53
  | { source: 'settings'; revision: number }
53
54
 
54
55
  export interface EffortDeclareSectionInjected {
55
- api: Pick<IApiClient, 'settings' | 'llm'>
56
+ llm: LlmDirectoryRemote
57
+ settings: SettingsWriteRemote
56
58
  describe: SettingsDescribeFace
57
59
  schema: SchemaOps
58
60
  subscribeInvalidate: (listener: (event: Invalidation) => void) => () => void
@@ -75,10 +77,11 @@ function compatSummary(compat: Record<string, unknown>): string {
75
77
  return parts.join(' · ')
76
78
  }
77
79
 
78
- function errorText(code: ReturnType<typeof modelEffortError>, t: (key: EffortDeclareKey) => string): string | undefined {
80
+ function errorText(code: ReturnType<typeof modelRowError>, t: (key: EffortDeclareKey) => string): string | undefined {
79
81
  if (code === 'empty') return t('errorEmpty')
80
82
  if (code === 'off-only') return t('errorOffOnly')
81
83
  if (code === 'bad-wire') return t('errorBadWire')
84
+ if (code === 'bad-input') return t('errorBadInput')
82
85
  return undefined
83
86
  }
84
87
 
@@ -114,6 +117,16 @@ function ModelRowEditor(props: {
114
117
  {t('clear')}
115
118
  </button>
116
119
  </div>
120
+ <label className={css.check}>
121
+ <input
122
+ type="checkbox"
123
+ checked={readImageCapable(row)}
124
+ disabled={disabled}
125
+ onChange={(event) => { onChange(writeImageCapable(row, event.target.checked)) }}
126
+ />
127
+ {t('imageInput')}
128
+ </label>
129
+ {readImageCapable(row) ? <p className={css.notice}>{t('imageInputHint')}</p> : null}
117
130
  <span className={css.fieldLabel}>{t('levels')}</span>
118
131
  <div className={css.levels}>
119
132
  {THINKING_LEVELS_WITHOUT_OFF.map((level) => (
@@ -197,7 +210,7 @@ function RouteCard(props: {
197
210
  const summary = compatSummary(draft.compat)
198
211
  const sameWire = draft.compat.supportsReasoningEffort === false
199
212
  const clientError = draft.models
200
- .map(row => errorText(modelEffortError(row), t))
213
+ .map(row => errorText(modelRowError(row), t))
201
214
  .find(text => text !== undefined)
202
215
  const dirty = draftDirty(draft)
203
216
 
@@ -330,7 +343,8 @@ function RouteCard(props: {
330
343
 
331
344
  export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNode {
332
345
  const t = props.t
333
- const api = props.api
346
+ const llm = props.llm
347
+ const settings = props.settings
334
348
  const describe = props.describe
335
349
  const schema = props.schema
336
350
  const [status, setStatus] = useState<'loading' | 'ready' | 'error'>('loading')
@@ -395,10 +409,10 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
395
409
  }
396
410
 
397
411
  const loadSnapshotThenSettle = async (generation: number, preserveDirty: boolean): Promise<void> => {
398
- if (api === undefined || describe === undefined || schema === undefined) return
412
+ if (llm === undefined || typeof llm.listConfigurableProviders !== 'function' || describe === undefined || schema === undefined) return
399
413
  if (!generationIsCurrent(generationRef, generation)) return
400
414
  try {
401
- const result = await loadDrafts(api, describe, schema, 'snapshot')
415
+ const result = await loadDrafts(llm, describe, schema, 'snapshot')
402
416
  settleReload(generation, preserveDirty, result)
403
417
  } catch (failure) {
404
418
  failGeneration(generation, failure)
@@ -406,7 +420,7 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
406
420
  }
407
421
 
408
422
  const reload = useCallback((preserveDirty: boolean, mode: LoadDraftsMode = 'ensure'): void => {
409
- if (api === undefined || describe === undefined || schema === undefined) {
423
+ if (llm === undefined || typeof llm.listConfigurableProviders !== 'function' || describe === undefined || schema === undefined) {
410
424
  setStatus('error')
411
425
  setError(t('loadError'))
412
426
  return
@@ -414,15 +428,15 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
414
428
  const { generation } = beginGeneration()
415
429
  if (draftsRef.current.length === 0) setStatus('loading')
416
430
  setError('')
417
- void loadDrafts(api, describe, schema, mode).then((result) => {
431
+ void loadDrafts(llm, describe, schema, mode).then((result) => {
418
432
  settleReload(generation, preserveDirty, result)
419
433
  }, (failure: unknown) => {
420
434
  failGeneration(generation, failure)
421
435
  })
422
- }, [api, describe, schema, t])
436
+ }, [llm, describe, schema, t])
423
437
 
424
438
  const refreshAtRevision = useCallback((revision: number, preserveDirty: boolean): void => {
425
- if (api === undefined || describe === undefined || schema === undefined) return
439
+ if (llm === undefined || typeof llm.listConfigurableProviders !== 'function' || describe === undefined || schema === undefined) return
426
440
  const { generation, signal } = beginGeneration()
427
441
  if (draftsRef.current.length === 0) setStatus('loading')
428
442
  setError('')
@@ -432,7 +446,7 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
432
446
  }, (failure: unknown) => {
433
447
  failGeneration(generation, failure)
434
448
  })
435
- }, [api, describe, schema, t])
449
+ }, [llm, describe, schema, t])
436
450
 
437
451
  const flushPendingSettings = (refresh: (revision: number, preserveDirty: boolean) => void): void => {
438
452
  const pending = pendingRevisionRef.current
@@ -480,13 +494,13 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
480
494
  }
481
495
 
482
496
  const save = async (draft: RouteDraft): Promise<void> => {
483
- if (api === undefined || describe === undefined || schema === undefined) return
497
+ if (settings === undefined || typeof settings.mutate !== 'function' || describe === undefined || schema === undefined) return
484
498
  if (status === 'loading' || busyRouteRef.current !== null) {
485
499
  patchNotice(draft.provider, { kind: 'error', text: t('saveBusy') })
486
500
  return
487
501
  }
488
502
  const blocking = draft.models
489
- .map(row => errorText(modelEffortError(row), t))
503
+ .map(row => errorText(modelRowError(row), t))
490
504
  .find(text => text !== undefined)
491
505
  if (blocking !== undefined) {
492
506
  patchNotice(draft.provider, { kind: 'error', text: blocking })
@@ -533,16 +547,12 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
533
547
  }
534
548
  }
535
549
  }
536
- const response = await api.settings.mutate({
537
- ns: LLM_PI_AI_NS,
538
- ops,
539
- expectedRevision: draft.revision,
540
- })
541
- if (!response.result.ok) {
542
- const conflict = response.result.error.code === 'settings-conflict'
550
+ const response = await settings.mutate(LLM_PI_AI_NS, ops, draft.revision)
551
+ if (!response.ok) {
552
+ const conflict = response.error.code === 'settings/conflict'
543
553
  patchNotice(draft.provider, {
544
554
  kind: conflict ? 'conflict' : 'error',
545
- text: conflict ? t('conflict') : response.result.error.message,
555
+ text: conflict ? t('conflict') : response.error.message,
546
556
  })
547
557
  if (conflict) {
548
558
  const { generation, signal } = beginGeneration()
@@ -555,7 +565,7 @@ export function EffortDeclareSection(props: EffortDeclareSectionProps): ReactNod
555
565
  }
556
566
  return
557
567
  }
558
- const view = response.result.value
568
+ const view = response.value
559
569
  echoedRevisionRef.current = view.revision
560
570
  describe.acceptView(view)
561
571
  applyDrafts(applySaveSuccess(draftsRef.current, draft.provider, {
@@ -7,22 +7,23 @@
7
7
  </samp>
8
8
  </p>
9
9
 
10
- Browser half: registers **Reasoning efforts** in the Web UI settings panel and writes `llm-pi-ai` through the official settings RPC.
10
+ Browser half: registers **Reasoning efforts** in the Web UI settings panel and writes per-model `reasoningEfforts` and `input` on `llm-pi-ai` through the official settings RPC.
11
11
 
12
- Wiring failures in `apply` throw, same as the official Models page. Do not swallow `apply` with a blanket `try/catch`. Locale, CSS, and event subscriptions are cleaned up through `ctx.effect` on unload.
12
+ Missing inject services keep the plugin PENDING so `apply` does not run. Do not wrap `apply` in a blanket `try/catch` (same as the official Models page). Missing RPC methods show as a load error on the page; do not treat an empty list as success. Locale, CSS, and event subscriptions are cleaned up through `ctx.effect` on unload.
13
13
 
14
- Cross-plugin work uses Cordis services only (`connection`, `settingsScope`, `settingsSchema`, `slots`, `locale`, `remote`). Do not value-import `@deepseek-ai/dsh-client-ui-settings-models`: the client bundle purity rule forbids inlining other `@deepseek-ai/*` packages except platform modules in the shell’s frozen table.
14
+ Cross-plugin work uses Cordis services only (`remote` / `remote.llm` / `remote.settings`, `settingsScope`, `settingsSchema`, `slots`, `locale`). Do not value-import `@deepseek-ai/dsh-client-ui-settings-models`: the client bundle purity rule forbids inlining other `@deepseek-ai/*` packages except platform modules in the shell’s frozen table.
15
15
 
16
16
  ## What's in this directory
17
17
 
18
18
  | File | Role |
19
19
  | --- | --- |
20
- | [`index.ts`](./index.ts) | Registers zh/en copy, CSS (`ctx.effect` insert/remove), and `settings.section` (id `effort-declare`, order 12). `describe.subscribe` only syncs `writable` (it fires for every namespace, including this page’s own `acceptView`). `settings/document-updated` (`llm-pi-ai` only) carries the Host revision; the section skips its own mutate echo, waits until the mirror revision has **caught up**, then `getSnapshot()` — it does not use `ensure()` as refresh. Provider directory changes come from `llm/adapters-updated`; `connection/reset` uses `ensure()` so an in-flight official `load()` is awaited. `locale: NS` lets the framework inject `t`; `inject` only returns `api` / `describe` / `schema` / `subscribeInvalidate`. |
21
- | [`EffortDeclareSection.tsx`](./EffortDeclareSection.tsx) | Route cards, presets, Off tri-state, advanced protocol switches, save and cancel. Save is exclusive for the whole `llm-pi-ai` namespace (ref-guarded against double-click); `busy` is “Saving…” on the in-flight card, `saveLocked` disables the others. A successful write syncs `draftsRef` immediately and folds `acceptView` + `applySaveSuccess`. External `document-updated` events that arrive during save are replayed afterwards. A reload with no conflict clears that card’s conflict/error notice. Footer shows the version and copyright years frozen at pack time. |
20
+ | [`index.ts`](./index.ts) | Registers zh/en copy, CSS (`ctx.effect` insert/remove), and `settings.section` (id `effort-declare`, order 12). `describe.subscribe` only syncs `writable` (it fires for every namespace, including this page’s own `acceptView`). `settings/document-updated` (`llm-pi-ai` only) carries the Host revision; the section skips its own mutate echo, waits until the mirror revision has **caught up**, then `getSnapshot()` — it does not use `ensure()` as refresh. Provider directory changes come from `llm/adapters-updated`; `connection/reset` uses `ensure()` so an in-flight official `load()` is awaited. `locale: NS` lets the framework inject `t`; the slot `inject()` only returns `llm` / `settings` / `describe` / `schema` / `subscribeInvalidate`. |
21
+ | [`EffortDeclareSection.tsx`](./EffortDeclareSection.tsx) | Route cards, presets, Off tri-state, per-model **Accepts image input**, advanced protocol switches, save and cancel. Save is exclusive for the whole `llm-pi-ai` namespace (ref-guarded against double-click); `busy` is “Saving…” on the in-flight card, `saveLocked` disables the others. Save is blocked by `modelRowError` for empty efforts, Off-only, and illegal `input`. A successful write syncs `draftsRef` immediately and folds `acceptView` + `applySaveSuccess`. External `document-updated` events that arrive during save are replayed afterwards. A reload with no conflict clears that card’s conflict/error notice. Footer shows the version and copyright years frozen at pack time. |
22
22
  | [`build-info.ts`](./build-info.ts) | Reads `package.json` version and UTC pack year injected by tsdown `define`, and formats the footer line. |
23
23
  | [`globals.d.ts`](./globals.d.ts) | Types for `__PLUGIN_VERSION__` and `__COPYRIGHT_TO__`. |
24
- | [`load-drafts.ts`](./load-drafts.ts) | Builds drafts from `llm.providers` + the settings mirror; drafts come from `user`, protocol classification may use `value`. `thinkingFormat` choices come only from the live schema union. First paint uses `ensure()`; refresh reads `getSnapshot()` only, with helpers that wait for the namespace revision. |
25
- | [`locales.ts`](./locales.ts) | Copy namespace `plugin-effort-declare`. |
24
+ | [`load-drafts.ts`](./load-drafts.ts) | Builds drafts from `llm.listConfigurableProviders` + the settings mirror; drafts come from `user`, protocol classification may use `value`. `thinkingFormat` choices come only from the live schema union. First paint uses `ensure()`; refresh reads `getSnapshot()` only, with helpers that wait for the namespace revision. |
25
+ | [`remotes.ts`](./remotes.ts) | The DSH 0.1.2 Remote methods this page calls: `listConfigurableProviders` and `settings.mutate` (`{ ok, value }` on success, `{ ok: false, error }` on failure, conflict code `settings/conflict`). |
26
+ | [`locales.ts`](./locales.ts) | Copy namespace `plugin-effort-declare` (efforts, image input, and validation errors). |
26
27
  | [`effort-declare.module.css`](./effort-declare.module.css) | `--dsw-alias-*` tokens only, so dark theme stays correct. |
27
28
  | [`schema-ops.ts`](./schema-ops.ts) | Binds `settingsSchema` as plain callbacks (including `validate`) so the service identity is not passed into React. |
28
29