@ycodium-ai/plugin-api 0.2.3608 → 0.2.3635
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/README.md +44 -5
- package/dist/conversationComposerApi.d.ts +0 -9
- package/dist/conversationComposerApi.d.ts.map +1 -1
- package/dist/conversationHostModels.d.ts +10 -0
- package/dist/conversationHostModels.d.ts.map +1 -1
- package/dist/conversationViewProps.d.ts +0 -1
- package/dist/conversationViewProps.d.ts.map +1 -1
- package/dist/dataPorts.gen.d.ts +727 -503
- package/dist/dataPorts.gen.d.ts.map +1 -1
- package/dist/dataPorts.gen.js.map +1 -1
- package/dist/executorCard.d.ts +6 -0
- package/dist/executorCard.d.ts.map +1 -1
- package/dist/executorCard.js.map +1 -1
- package/dist/executorSession.d.ts +10 -1
- package/dist/executorSession.d.ts.map +1 -1
- package/dist/index.d.ts +20 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -3
- package/dist/index.js.map +1 -1
- package/dist/modelChoice.d.ts +110 -0
- package/dist/modelChoice.d.ts.map +1 -0
- package/dist/modelChoice.js +198 -0
- package/dist/modelChoice.js.map +1 -0
- package/dist/modelChoiceOptions.d.ts +79 -0
- package/dist/modelChoiceOptions.d.ts.map +1 -0
- package/dist/modelChoiceOptions.js +210 -0
- package/dist/modelChoiceOptions.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import type { ModelOptionLabelKind } from "./executorModelOptions.ts";
|
|
2
|
+
import type { ConversationProviderOptionDescriptor, ConversationProviderOptionSelection } from "./conversationHostModels.ts";
|
|
3
|
+
export type ModelChoiceOptionSelection = ConversationProviderOptionSelection;
|
|
4
|
+
export type ModelChoiceOptionValue = ConversationProviderOptionSelection["value"];
|
|
5
|
+
type SelectDescriptor = Extract<ConversationProviderOptionDescriptor, {
|
|
6
|
+
type: "select";
|
|
7
|
+
}>;
|
|
8
|
+
type BooleanDescriptor = Extract<ConversationProviderOptionDescriptor, {
|
|
9
|
+
type: "boolean";
|
|
10
|
+
}>;
|
|
11
|
+
/** 目录里一个选项描述符里解析器用到的那部分字段;形状取自会话接口的描述符,不另写一份。 */
|
|
12
|
+
export type ModelChoiceOptionDescriptor = (Pick<SelectDescriptor, "type" | "id" | "currentValue" | "promptInjectedValues"> & {
|
|
13
|
+
readonly options: ReadonlyArray<Pick<SelectDescriptor["options"][number], "id" | "isDefault">>;
|
|
14
|
+
}) | Pick<BooleanDescriptor, "type" | "id" | "currentValue">;
|
|
15
|
+
/**
|
|
16
|
+
* - `explicit`:用户显式选过,且该型号支持;
|
|
17
|
+
* - `default`:没选过或选的不被支持,显示的是该型号默认;
|
|
18
|
+
* - `unknown`:目录没说这个型号有什么档位,存储值原样显示、原样派发。
|
|
19
|
+
*/
|
|
20
|
+
export type ModelChoiceOptionSource = "explicit" | "default" | "unknown";
|
|
21
|
+
export interface ModelChoiceOptionState {
|
|
22
|
+
readonly id: string;
|
|
23
|
+
readonly kind: ModelOptionLabelKind | undefined;
|
|
24
|
+
/** 用户存的值,原样。 */
|
|
25
|
+
readonly stored: ModelChoiceOptionValue | undefined;
|
|
26
|
+
/** 界面显示与实际运行用的值。 */
|
|
27
|
+
readonly effective: ModelChoiceOptionValue | undefined;
|
|
28
|
+
readonly source: ModelChoiceOptionSource;
|
|
29
|
+
/** 存储值不被该型号支持时为 false;没存值或目录没说时为 true。 */
|
|
30
|
+
readonly supported: boolean;
|
|
31
|
+
/** select 描述符里可选的取值(退役的产品档已去掉);boolean 与未知时缺席。 */
|
|
32
|
+
readonly choices?: ReadonlyArray<string>;
|
|
33
|
+
}
|
|
34
|
+
/** 给界面与 IM 的提示;只带事实,文案由各端按自己的词表写。 */
|
|
35
|
+
export type ModelChoiceHint = {
|
|
36
|
+
readonly kind: "option-unsupported";
|
|
37
|
+
readonly model: string | null;
|
|
38
|
+
readonly optionId: string;
|
|
39
|
+
readonly stored: ModelChoiceOptionValue;
|
|
40
|
+
readonly effective: ModelChoiceOptionValue | undefined;
|
|
41
|
+
} | {
|
|
42
|
+
readonly kind: "effort-moved";
|
|
43
|
+
readonly model: string | null;
|
|
44
|
+
readonly optionId: string;
|
|
45
|
+
readonly from: string;
|
|
46
|
+
readonly to: string;
|
|
47
|
+
} | {
|
|
48
|
+
readonly kind: "model-replaced";
|
|
49
|
+
readonly from: string;
|
|
50
|
+
readonly to: string | null;
|
|
51
|
+
} | {
|
|
52
|
+
readonly kind: "model-unavailable";
|
|
53
|
+
readonly model: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* `previous` 在 `supported` 里就原样返回,否则取最近的一档(距离相同取更强的)。
|
|
57
|
+
* `previous` 不是认得的档位,或 `supported` 里没有认得的档位,返回 undefined。
|
|
58
|
+
*/
|
|
59
|
+
export declare function nearestEffortLevel(previous: string, supported: ReadonlyArray<string>): string | undefined;
|
|
60
|
+
export interface ResolvedModelOptions {
|
|
61
|
+
readonly options: ReadonlyArray<ModelChoiceOptionState>;
|
|
62
|
+
/** 只含用户显式选过、该型号支持(或目录没说)的项;这就是派发时带出去的档位。 */
|
|
63
|
+
readonly dispatch: ReadonlyArray<ModelChoiceOptionSelection>;
|
|
64
|
+
readonly hints: ReadonlyArray<ModelChoiceHint>;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* 一个型号的档位解析。
|
|
68
|
+
*
|
|
69
|
+
* - `descriptors`:该型号在目录里的描述符;`null` = 不知道(未列出、目录没确认、能力未报)。
|
|
70
|
+
* - `moveEffort`:新建会话时型号被换掉的那一次,思考档的存储值不被新型号支持就挪到最近一档。
|
|
71
|
+
*/
|
|
72
|
+
export declare function resolveModelOptions(input: {
|
|
73
|
+
readonly model: string | null;
|
|
74
|
+
readonly descriptors: ReadonlyArray<ModelChoiceOptionDescriptor> | null;
|
|
75
|
+
readonly stored: ReadonlyArray<ModelChoiceOptionSelection>;
|
|
76
|
+
readonly moveEffort: boolean;
|
|
77
|
+
}): ResolvedModelOptions;
|
|
78
|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AG,SAAS,CAmBpB;AAqDD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,OAAO,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IACxD,4CAA4C;IAC5C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;IAC7D,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,eAAe,CAAC,CAAC;CAChD;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE;IACzC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,QAAQ,CAAC,WAAW,EAAE,aAAa,CAAC,2BAA2B,CAAC,GAAG,IAAI,CAAC;IACxE,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC,0BAA0B,CAAC,CAAC;IAC3D,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;CAC9B,GAAG,oBAAoB,CA+GvB"}
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 模型选择解析器里「档位」那一半:一个型号的描述符 + 用户存下的值 → 每个选项的存储值、有效值、
|
|
3
|
+
* 来源、是否被该型号支持,以及真正该派发的那几项。
|
|
4
|
+
*
|
|
5
|
+
* 约束:
|
|
6
|
+
* - 存储值只读不改;换型号后新型号不认的值留在存储里,显示与派发按该型号默认(每个型号各记各的)。
|
|
7
|
+
* - 描述符为 `null` = 目录没说(未知),不是「没有档位」;`[]` 才是明确没有。
|
|
8
|
+
* - 哪个 id 是思考档只经 `modelOptionLabelKind`,不在这里再列一张名单。
|
|
9
|
+
*/
|
|
10
|
+
import { knownEffortLevel, modelOptionLabelKind, reasoningEffortLevel, } from "./executorModelOptions.js";
|
|
11
|
+
/** 认得的思考档位由弱到强的名次;以 `ReasoningEffortLevel` 为键,档位表加了档位这里漏写就编译不过。 */
|
|
12
|
+
const EFFORT_RANK = {
|
|
13
|
+
none: 0,
|
|
14
|
+
minimal: 1,
|
|
15
|
+
low: 2,
|
|
16
|
+
medium: 3,
|
|
17
|
+
high: 4,
|
|
18
|
+
xhigh: 5,
|
|
19
|
+
max: 6,
|
|
20
|
+
ultra: 7,
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* `previous` 在 `supported` 里就原样返回,否则取最近的一档(距离相同取更强的)。
|
|
24
|
+
* `previous` 不是认得的档位,或 `supported` 里没有认得的档位,返回 undefined。
|
|
25
|
+
*/
|
|
26
|
+
export function nearestEffortLevel(previous, supported) {
|
|
27
|
+
if (supported.includes(previous))
|
|
28
|
+
return previous;
|
|
29
|
+
const from = reasoningEffortLevel(previous);
|
|
30
|
+
if (from === undefined)
|
|
31
|
+
return undefined;
|
|
32
|
+
const fromRank = EFFORT_RANK[from];
|
|
33
|
+
let best;
|
|
34
|
+
for (const id of supported) {
|
|
35
|
+
const level = reasoningEffortLevel(id);
|
|
36
|
+
if (level === undefined)
|
|
37
|
+
continue;
|
|
38
|
+
const rank = EFFORT_RANK[level];
|
|
39
|
+
if (best === undefined ||
|
|
40
|
+
Math.abs(rank - fromRank) < Math.abs(best.rank - fromRank) ||
|
|
41
|
+
(Math.abs(rank - fromRank) === Math.abs(best.rank - fromRank) && rank > best.rank)) {
|
|
42
|
+
best = { id, rank };
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return best?.id;
|
|
46
|
+
}
|
|
47
|
+
/** select 描述符里该显示的取值:被标成「改的是正文」的 ultrathink 是退役的产品档,不再可选。 */
|
|
48
|
+
function selectableChoices(descriptor) {
|
|
49
|
+
const retired = descriptor.promptInjectedValues?.includes("ultrathink") === true;
|
|
50
|
+
return descriptor.options
|
|
51
|
+
.map((option) => option.id)
|
|
52
|
+
.filter((id) => !(retired && id === "ultrathink"));
|
|
53
|
+
}
|
|
54
|
+
function descriptorDefault(descriptor, choices) {
|
|
55
|
+
if (descriptor.type === "boolean")
|
|
56
|
+
return descriptor.currentValue;
|
|
57
|
+
const current = descriptor.currentValue;
|
|
58
|
+
if (current !== undefined && acceptsValue(descriptor, choices, current))
|
|
59
|
+
return current;
|
|
60
|
+
const flagged = descriptor.options.find((option) => option.isDefault === true)?.id;
|
|
61
|
+
return flagged !== undefined && choices.includes(flagged) ? flagged : undefined;
|
|
62
|
+
}
|
|
63
|
+
/** 存储值能不能当该描述符的取值;空选项列表是 provider 自己的自定义档,原样放行(退役档除外)。 */
|
|
64
|
+
function acceptsValue(descriptor, choices, value) {
|
|
65
|
+
if (descriptor.type === "boolean")
|
|
66
|
+
return typeof value === "boolean";
|
|
67
|
+
if (typeof value !== "string")
|
|
68
|
+
return false;
|
|
69
|
+
if (descriptor.options.length === 0) {
|
|
70
|
+
return !(value === "ultrathink" && descriptor.promptInjectedValues?.includes(value) === true);
|
|
71
|
+
}
|
|
72
|
+
// 被标成「改的是正文」的取值不是真档位:选项里有也回默认,与旧的取值解析一致。
|
|
73
|
+
return choices.includes(value) && descriptor.promptInjectedValues?.includes(value) !== true;
|
|
74
|
+
}
|
|
75
|
+
/** 同一个 id 重复存了以第一条为准;空 id、空白值不算「选过」。 */
|
|
76
|
+
function storedById(stored) {
|
|
77
|
+
const byId = new Map();
|
|
78
|
+
for (const selection of stored) {
|
|
79
|
+
const id = selection.id.trim();
|
|
80
|
+
// 契约里的取值都是去过空白的;旧数据里带空白的照同样处理,别判成「不支持」。
|
|
81
|
+
const value = typeof selection.value === "string" ? selection.value.trim() : selection.value;
|
|
82
|
+
if (id === "" || value === "" || byId.has(id))
|
|
83
|
+
continue;
|
|
84
|
+
byId.set(id, value);
|
|
85
|
+
}
|
|
86
|
+
return byId;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* 一个型号的档位解析。
|
|
90
|
+
*
|
|
91
|
+
* - `descriptors`:该型号在目录里的描述符;`null` = 不知道(未列出、目录没确认、能力未报)。
|
|
92
|
+
* - `moveEffort`:新建会话时型号被换掉的那一次,思考档的存储值不被新型号支持就挪到最近一档。
|
|
93
|
+
*/
|
|
94
|
+
export function resolveModelOptions(input) {
|
|
95
|
+
const storedMap = storedById(input.stored);
|
|
96
|
+
const options = [];
|
|
97
|
+
const hints = [];
|
|
98
|
+
if (input.descriptors === null) {
|
|
99
|
+
for (const [id, value] of storedMap) {
|
|
100
|
+
options.push({
|
|
101
|
+
id,
|
|
102
|
+
kind: modelOptionLabelKind(id),
|
|
103
|
+
stored: value,
|
|
104
|
+
effective: value,
|
|
105
|
+
source: "unknown",
|
|
106
|
+
supported: true,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
return { options, dispatch: dispatchOf(options), hints };
|
|
110
|
+
}
|
|
111
|
+
const seen = new Set();
|
|
112
|
+
for (const descriptor of input.descriptors) {
|
|
113
|
+
if (seen.has(descriptor.id))
|
|
114
|
+
continue;
|
|
115
|
+
seen.add(descriptor.id);
|
|
116
|
+
const kind = modelOptionLabelKind(descriptor.id);
|
|
117
|
+
const choices = descriptor.type === "select" ? selectableChoices(descriptor) : undefined;
|
|
118
|
+
const fallback = descriptorDefault(descriptor, choices ?? []);
|
|
119
|
+
const base = { id: descriptor.id, kind, ...(choices === undefined ? {} : { choices }) };
|
|
120
|
+
const value = storedMap.get(descriptor.id);
|
|
121
|
+
if (value === undefined) {
|
|
122
|
+
options.push({
|
|
123
|
+
...base,
|
|
124
|
+
stored: undefined,
|
|
125
|
+
effective: fallback,
|
|
126
|
+
source: "default",
|
|
127
|
+
supported: true,
|
|
128
|
+
});
|
|
129
|
+
continue;
|
|
130
|
+
}
|
|
131
|
+
if (acceptsValue(descriptor, choices ?? [], value)) {
|
|
132
|
+
options.push({
|
|
133
|
+
...base,
|
|
134
|
+
stored: value,
|
|
135
|
+
effective: value,
|
|
136
|
+
source: "explicit",
|
|
137
|
+
supported: true,
|
|
138
|
+
});
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
const moved = input.moveEffort &&
|
|
142
|
+
typeof value === "string" &&
|
|
143
|
+
knownEffortLevel(descriptor.id, value) !== undefined &&
|
|
144
|
+
choices !== undefined
|
|
145
|
+
? nearestEffortLevel(value, choices.filter((choice) => acceptsValue(descriptor, choices, choice)))
|
|
146
|
+
: undefined;
|
|
147
|
+
if (moved !== undefined) {
|
|
148
|
+
hints.push({
|
|
149
|
+
kind: "effort-moved",
|
|
150
|
+
model: input.model,
|
|
151
|
+
optionId: descriptor.id,
|
|
152
|
+
from: value,
|
|
153
|
+
to: moved,
|
|
154
|
+
});
|
|
155
|
+
options.push({
|
|
156
|
+
...base,
|
|
157
|
+
stored: value,
|
|
158
|
+
effective: moved,
|
|
159
|
+
source: "explicit",
|
|
160
|
+
supported: true,
|
|
161
|
+
});
|
|
162
|
+
continue;
|
|
163
|
+
}
|
|
164
|
+
options.push({
|
|
165
|
+
...base,
|
|
166
|
+
stored: value,
|
|
167
|
+
effective: fallback,
|
|
168
|
+
source: "default",
|
|
169
|
+
supported: false,
|
|
170
|
+
});
|
|
171
|
+
hints.push({
|
|
172
|
+
kind: "option-unsupported",
|
|
173
|
+
model: input.model,
|
|
174
|
+
optionId: descriptor.id,
|
|
175
|
+
stored: value,
|
|
176
|
+
effective: fallback,
|
|
177
|
+
});
|
|
178
|
+
}
|
|
179
|
+
// 存了、但该型号根本没有这一格:存储保留,显示与派发都不带。
|
|
180
|
+
for (const [id, value] of storedMap) {
|
|
181
|
+
if (seen.has(id))
|
|
182
|
+
continue;
|
|
183
|
+
options.push({
|
|
184
|
+
id,
|
|
185
|
+
kind: modelOptionLabelKind(id),
|
|
186
|
+
stored: value,
|
|
187
|
+
effective: undefined,
|
|
188
|
+
source: "default",
|
|
189
|
+
supported: false,
|
|
190
|
+
});
|
|
191
|
+
hints.push({
|
|
192
|
+
kind: "option-unsupported",
|
|
193
|
+
model: input.model,
|
|
194
|
+
optionId: id,
|
|
195
|
+
stored: value,
|
|
196
|
+
effective: undefined,
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
return { options, dispatch: dispatchOf(options), hints };
|
|
200
|
+
}
|
|
201
|
+
function dispatchOf(options) {
|
|
202
|
+
const out = [];
|
|
203
|
+
for (const option of options) {
|
|
204
|
+
if (!option.supported || option.source === "default" || option.effective === undefined)
|
|
205
|
+
continue;
|
|
206
|
+
out.push({ id: option.id, value: option.effective });
|
|
207
|
+
}
|
|
208
|
+
return out;
|
|
209
|
+
}
|
|
210
|
+
//# sourceMappingURL=modelChoiceOptions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelChoiceOptions.js","sourceRoot":"","sources":["../src/modelChoiceOptions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AA+DnC,mEAAmE;AACnE,MAAM,WAAW,GAAmD;IAClE,IAAI,EAAE,CAAC;IACP,OAAO,EAAE,CAAC;IACV,GAAG,EAAE,CAAC;IACN,MAAM,EAAE,CAAC;IACT,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;IACR,GAAG,EAAE,CAAC;IACN,KAAK,EAAE,CAAC;CACT,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,QAAgB,EAChB,SAAgC;IAEhC,IAAI,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAAE,OAAO,QAAQ,CAAC;IAClD,MAAM,IAAI,GAAG,oBAAoB,CAAC,QAAQ,CAAC,CAAC;IAC5C,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,IAAgE,CAAC;IACrE,KAAK,MAAM,EAAE,IAAI,SAAS,EAAE,CAAC;QAC3B,MAAM,KAAK,GAAG,oBAAoB,CAAC,EAAE,CAAC,CAAC;QACvC,IAAI,KAAK,KAAK,SAAS;YAAE,SAAS;QAClC,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;QAChC,IACE,IAAI,KAAK,SAAS;YAClB,IAAI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