@dsh-plus/llm-pi 0.1.42 → 0.1.43
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.
- package/lib/client.js +1489 -636
- package/lib/index.d.ts +4 -8
- package/lib/index.js +943 -391
- package/package.json +35 -36
- package/src/catalog/browse.ts +297 -0
- package/src/catalog/builtin.ts +183 -35
- package/src/client/api.ts +96 -33
- package/src/client/card.tsx +180 -120
- package/src/client/client.ts +2 -2
- package/src/client/constants.ts +25 -5
- package/src/client/draft.ts +34 -13
- package/src/client/fields.tsx +18 -3
- package/src/client/i18n.ts +153 -49
- package/src/client/root-fields.tsx +64 -52
- package/src/client/route-fit.ts +117 -0
- package/src/client/styles.ts +40 -10
- package/src/client/views/catalog-browser.tsx +376 -0
- package/src/client/views/catalog-row.tsx +147 -0
- package/src/client/views/compat.tsx +31 -3
- package/src/client/views/models.tsx +189 -193
- package/src/client/views/provider-fields.tsx +2 -2
- package/src/client/views/providers.tsx +51 -11
- package/src/compat.ts +43 -19
- package/src/config-api.ts +65 -37
- package/src/config.ts +20 -28
- package/src/inherit.ts +15 -31
- package/src/kit-meta.ts +156 -0
- package/src/{compat-gates.ts → official-surface.ts} +60 -16
- package/src/profiles.ts +52 -13
- package/src/resolve-dsh.ts +291 -72
- package/src/service.ts +209 -90
- package/src/catalog/models-dev.ts +0 -261
package/lib/index.d.ts
CHANGED
|
@@ -4,9 +4,8 @@ import { Context } from "@deepseek-ai/cordis";
|
|
|
4
4
|
//#region src/config.d.ts
|
|
5
5
|
/** settings 命名空间(字面量即合法命名空间,0.1.2-alpha.2 起编译期校验;webui 配置卡片与插件运行期读取同一份)。 */
|
|
6
6
|
declare const SETTINGS_NS = "dsh-plus-llm-pi";
|
|
7
|
-
/**
|
|
8
|
-
|
|
9
|
-
type ProtocolId = (typeof PROTOCOL_IDS)[number];
|
|
7
|
+
/** 线协议标识;合法集合运行期推导,故此处是开放字符串而非字面量联合。 */
|
|
8
|
+
type ProtocolId = string;
|
|
10
9
|
/** pi-ai 思考档位,升级序。 */
|
|
11
10
|
declare const THINKING_LEVELS: readonly ['off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max'];
|
|
12
11
|
declare const MODALITIES: readonly ['text', 'image'];
|
|
@@ -80,17 +79,14 @@ interface ProviderProfileConfig {
|
|
|
80
79
|
fileExpiresAfterSeconds?: number;
|
|
81
80
|
fileRefreshMarginSeconds?: number;
|
|
82
81
|
}
|
|
83
|
-
/**
|
|
82
|
+
/** 插件配置根(模型目录唯一来自 pi-ai 内置目录,故无任何目录端点字段)。 */
|
|
84
83
|
interface LlmPiConfig {
|
|
85
84
|
enabled: boolean;
|
|
86
|
-
catalogUrl: string;
|
|
87
|
-
catalogRefreshHours: number;
|
|
88
|
-
catalogProxy: string;
|
|
89
85
|
providers: Record<string, ProviderProfileConfig>;
|
|
90
86
|
}
|
|
91
87
|
/**
|
|
92
88
|
* schema 的宽松输入面:cordis 行级 config 与 settings 用户层都可能只给部分键
|
|
93
|
-
* (
|
|
89
|
+
* (2 个根字段均有 schema 默认值),解析输出仍是完整的 {@link LlmPiConfig}。
|
|
94
90
|
*/
|
|
95
91
|
type LlmPiConfigInput = Partial<LlmPiConfig>;
|
|
96
92
|
/** 活动字段形态(0.1.7 loader 解析产物:volatile 字段为活动引用)。 */
|