@webskill/chatbot 0.24.1 → 0.24.3
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/dist/config.d.ts +16 -3
- package/dist/config.js +130 -22
- package/dist/index.d.ts +1 -1
- package/dist/index.js +42 -10
- package/dist/{parse-BaIF8Nm5.js → parse-B6YPceVb.js} +3 -1
- package/dist/vite.js +1 -1
- package/package.json +2 -2
package/dist/config.d.ts
CHANGED
|
@@ -58,15 +58,22 @@ interface ApplyConfigDefaultsInput {
|
|
|
58
58
|
/** 上次应用过的缺省值快照,可缺席 */
|
|
59
59
|
readonly lastApplied?: WebSkillConfigDefaults;
|
|
60
60
|
}
|
|
61
|
-
/**
|
|
61
|
+
/** 合并结果:可直接使用的配置,以及要持久化的本次快照 @experimental */
|
|
62
62
|
interface AppliedConfigDefaults {
|
|
63
63
|
readonly config: RuntimeConfig;
|
|
64
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* 本次应用的快照;调用方负责持久化,下次作为 `lastApplied` 传回。
|
|
66
|
+
* 有烘焙模型时它还带一个内部同步状态(0.27.1),**必须整对象存取**——
|
|
67
|
+
* 只挑 `WebSkillConfigDefaults` 的已知键会把状态丢掉。
|
|
68
|
+
*/
|
|
65
69
|
readonly snapshot: WebSkillConfigDefaults;
|
|
66
70
|
}
|
|
67
71
|
/**
|
|
68
72
|
* `lastApplied` 缺席时每条分支都退化成「stored 存在就取 stored」,
|
|
69
73
|
* 即老实现的 `deepMerge(defaults, stored)`——修订跟随是纯增量,不改既有语义。
|
|
74
|
+
*
|
|
75
|
+
* 快照里的内部同步状态只在有烘焙模型时出现;它不是 `RuntimeConfig` 字段,
|
|
76
|
+
* 宿主照旧整存整取快照即可。
|
|
70
77
|
* @experimental
|
|
71
78
|
*/
|
|
72
79
|
declare function applyConfigDefaults(input: ApplyConfigDefaultsInput): AppliedConfigDefaults;
|
|
@@ -97,7 +104,13 @@ declare const BAKED_KEY_SENTINEL = "\0webskill:baked-api-key";
|
|
|
97
104
|
* @experimental
|
|
98
105
|
*/
|
|
99
106
|
type BakedSecretLoader = () => Promise<Readonly<Record<string, string>>>;
|
|
100
|
-
/**
|
|
107
|
+
/**
|
|
108
|
+
* 上次生效的缺省值快照仓;存哪儿由宿主决定。
|
|
109
|
+
*
|
|
110
|
+
* 快照除了 `WebSkillConfigDefaults` 还可能带内部同步状态(0.27.1),
|
|
111
|
+
* 因此宿主必须**整对象存取**,不能只挑已知键。
|
|
112
|
+
* @experimental
|
|
113
|
+
*/
|
|
101
114
|
interface ConfigDefaultsSnapshotStore {
|
|
102
115
|
read(): Promise<WebSkillConfigDefaults | undefined> | WebSkillConfigDefaults | undefined;
|
|
103
116
|
write(snapshot: WebSkillConfigDefaults): Promise<void> | void;
|
package/dist/config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as mergeRuntimeConfigDefaults } from "./types-DzBMgDa6.js";
|
|
2
|
-
import { a as NON_CONFIGURABLE_RUNTIME_PATHS, i as CONFIG_FIELDS, n as parseWebSkillConfig, o as WebSkillConfigError, r as CONFIGURED_RUNTIME_PATHS, t as CONFIG_TOP_LEVEL_SECTIONS } from "./parse-
|
|
2
|
+
import { a as NON_CONFIGURABLE_RUNTIME_PATHS, i as CONFIG_FIELDS, n as parseWebSkillConfig, o as WebSkillConfigError, r as CONFIGURED_RUNTIME_PATHS, t as CONFIG_TOP_LEVEL_SECTIONS } from "./parse-B6YPceVb.js";
|
|
3
3
|
|
|
4
4
|
//#region ../ui-kit/src/runtime-config/siteAccess.ts
|
|
5
5
|
/**
|
|
@@ -57,6 +57,7 @@ function isAllowedSite(url, allowedHosts) {
|
|
|
57
57
|
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/config/merge.ts
|
|
60
|
+
const BAKED_SYNC_KEY = "__webskillBakedSync";
|
|
60
61
|
function isPlainObject(value) {
|
|
61
62
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
62
63
|
}
|
|
@@ -91,28 +92,125 @@ function mergeLeaf(stored, defaultValue, lastApplied) {
|
|
|
91
92
|
if (lastApplied !== void 0 && sameValue(stored, lastApplied)) return defaultValue;
|
|
92
93
|
return stored;
|
|
93
94
|
}
|
|
95
|
+
/** 模型列表内容的摘要;只用于判断「与上次记录相比有没有变」,不是加密承诺 */
|
|
96
|
+
function fingerprintEntries(value) {
|
|
97
|
+
let text;
|
|
98
|
+
try {
|
|
99
|
+
text = JSON.stringify(value ?? []) ?? "null";
|
|
100
|
+
} catch {
|
|
101
|
+
return "unserializable";
|
|
102
|
+
}
|
|
103
|
+
let h1 = 2166136261;
|
|
104
|
+
let h2 = 16777619;
|
|
105
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
106
|
+
const code = text.charCodeAt(i);
|
|
107
|
+
h1 = Math.imul(h1 ^ code, 16777619) >>> 0;
|
|
108
|
+
h2 = Math.imul(h2 ^ code, 2246822507) >>> 0;
|
|
109
|
+
}
|
|
110
|
+
return `${text.length}:${h1.toString(16)}:${h2.toString(16)}`;
|
|
111
|
+
}
|
|
112
|
+
/** 读快照里的内部状态;形状非法时当作没有(旧快照 / 手改过的存储) */
|
|
113
|
+
function readBakedSync(snapshot) {
|
|
114
|
+
if (snapshot === void 0) return void 0;
|
|
115
|
+
const value = snapshot[BAKED_SYNC_KEY];
|
|
116
|
+
if (!isPlainObject(value)) return void 0;
|
|
117
|
+
const mode = value["mode"];
|
|
118
|
+
const fingerprint = value["fingerprint"];
|
|
119
|
+
if ((mode === "baked" || mode === "repair" || mode === "user") && typeof fingerprint === "string") return {
|
|
120
|
+
mode,
|
|
121
|
+
fingerprint
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* 旧快照的一次性修复:只补烘焙条目里存储缺失的键,不覆盖已有值。
|
|
126
|
+
*
|
|
127
|
+
* 旧快照分不出「上一次下发留下的旧条目」与「用户主动清空过一个字段」,
|
|
128
|
+
* 所以只能补缺失:`contextWindow`、`capabilities.image` 这类新字段能回来,
|
|
129
|
+
* 用户改过的 `baseUrl` / `apiKey` / `image: false` 一个字不动。
|
|
130
|
+
*/
|
|
131
|
+
function fillMissingValue(current, fallback) {
|
|
132
|
+
if (current === void 0) return fallback;
|
|
133
|
+
if (isPlainObject(current) && isPlainObject(fallback)) {
|
|
134
|
+
const out = { ...current };
|
|
135
|
+
for (const key of Object.keys(fallback)) {
|
|
136
|
+
if (key === "apiKey") continue;
|
|
137
|
+
const value = fillMissingValue(current[key], fallback[key]);
|
|
138
|
+
if (value !== void 0) out[key] = value;
|
|
139
|
+
}
|
|
140
|
+
return out;
|
|
141
|
+
}
|
|
142
|
+
return current;
|
|
143
|
+
}
|
|
144
|
+
function repairBakedEntries(entries, baked) {
|
|
145
|
+
const byId = new Map(baked.map((entry) => [entry.id, entry]));
|
|
146
|
+
return entries.map((entry) => {
|
|
147
|
+
const source = byId.get(entry.id);
|
|
148
|
+
return source === void 0 ? entry : fillMissingValue(entry, source);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
94
151
|
/**
|
|
95
|
-
* 烘焙模型按 id 强制同步(0.21.0 分册 24 · FR-24.1
|
|
152
|
+
* 烘焙模型按 id 强制同步(0.21.0 分册 24 · FR-24.1),并记住「下发/修复之后
|
|
153
|
+
* 用户存储有没有变」(0.27.1 分册 10)。
|
|
96
154
|
*
|
|
97
155
|
* 与 `mergeLeaf` 的「缺省值」语义不同,这里是**下发**:整片 `entries` 是一片叶子,
|
|
98
|
-
*
|
|
156
|
+
* 不做字段级合并,以免造出「一半新一半旧」的端点。
|
|
99
157
|
* 所以烘焙条目按 id 整条覆盖、按 defaults 的顺序在前,用户自建的按原相对序在末尾。
|
|
100
158
|
*
|
|
101
|
-
*
|
|
159
|
+
* 下发只在**运维真的重新打包过模型配置时**发生(FR-24.1d):烘焙列表与快照逐字
|
|
102
160
|
* 相同,说明这一版没人改过 `config.json`,此时用户在 Console 里的改动与排序全部作数。
|
|
103
161
|
* 快照缺席(全新安装或重装扩展)按「变了」处理——那正是「恢复初始化配置」的时刻。
|
|
104
162
|
*
|
|
105
163
|
* 读的是 `stored` 原始值而不是合并后的那份:合并后的 `entries` 已经被叶子规则
|
|
106
164
|
* 选过边,从它数不准「用户自建了哪些」。
|
|
165
|
+
*
|
|
166
|
+
* 0.27.1 之前,下发结果没有落进 `stored`,快照却在第一次加载后变成了新烘焙列表;
|
|
167
|
+
* 第二次加载因此误判「用户没动过」的分支为「用户胜出」,把刚下发的字段丢掉。
|
|
168
|
+
* 内部状态记录了下发那一刻 `stored` 的指纹:指纹没变就继续下发/修复,
|
|
169
|
+
* 变了才是用户真的动过。
|
|
107
170
|
*/
|
|
108
|
-
function syncBakedEntries(stored, baked, previous, retired) {
|
|
171
|
+
function syncBakedEntries(stored, baked, previous, lastApplied, retired) {
|
|
172
|
+
const raw = Array.isArray(stored) ? stored : [];
|
|
173
|
+
const fingerprint = fingerprintEntries(raw);
|
|
174
|
+
const state = readBakedSync(lastApplied);
|
|
175
|
+
const bakedChanged = previous === void 0 || !sameValue(previous, baked);
|
|
176
|
+
const kept = raw.filter((entry) => isPlainObject(entry) && typeof entry["id"] === "string" && !retired.has(entry["id"]));
|
|
109
177
|
const bakedIds = new Set(baked.map((entry) => entry.id));
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
178
|
+
const keptIds = new Set(kept.map((entry) => entry.id));
|
|
179
|
+
const bakedFirst = [...baked, ...kept.filter((entry) => !bakedIds.has(entry.id))];
|
|
180
|
+
const storedFirst = [...kept, ...baked.filter((entry) => !keptIds.has(entry.id))];
|
|
181
|
+
if (bakedChanged) return {
|
|
182
|
+
entries: bakedFirst,
|
|
183
|
+
state: {
|
|
184
|
+
mode: "baked",
|
|
185
|
+
fingerprint
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
if (state === void 0) return {
|
|
189
|
+
entries: repairBakedEntries(storedFirst, baked),
|
|
190
|
+
state: {
|
|
191
|
+
mode: "repair",
|
|
192
|
+
fingerprint
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
if (state.fingerprint !== fingerprint) return {
|
|
196
|
+
entries: storedFirst,
|
|
197
|
+
state: {
|
|
198
|
+
mode: "user",
|
|
199
|
+
fingerprint
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
if (state.mode === "baked") return {
|
|
203
|
+
entries: bakedFirst,
|
|
204
|
+
state
|
|
205
|
+
};
|
|
206
|
+
if (state.mode === "repair") return {
|
|
207
|
+
entries: repairBakedEntries(storedFirst, baked),
|
|
208
|
+
state
|
|
209
|
+
};
|
|
210
|
+
return {
|
|
211
|
+
entries: storedFirst,
|
|
212
|
+
state
|
|
213
|
+
};
|
|
116
214
|
}
|
|
117
215
|
/**
|
|
118
216
|
* 上一版烘过、这一版不再烘的 id(FR-24.5)。
|
|
@@ -133,30 +231,40 @@ function resolveDefaultId(entries, current) {
|
|
|
133
231
|
/** `llm.entries` 之外的一切仍走 0.20.0 的逐叶子规则 */
|
|
134
232
|
function applyBakedModels(merged, stored, defaults, lastApplied) {
|
|
135
233
|
const baked = defaults.llm?.entries;
|
|
136
|
-
if (baked === void 0 || !isPlainObject(merged)) return merged;
|
|
234
|
+
if (baked === void 0 || !isPlainObject(merged)) return { merged };
|
|
137
235
|
const storedLlm = isPlainObject(stored) ? stored["llm"] : void 0;
|
|
138
|
-
const
|
|
236
|
+
const sync = syncBakedEntries(isPlainObject(storedLlm) ? storedLlm["entries"] : void 0, baked, lastApplied?.llm?.entries, lastApplied, retiredBakedIds(lastApplied, baked));
|
|
139
237
|
const llm = isPlainObject(merged["llm"]) ? merged["llm"] : {};
|
|
140
|
-
const defaultId = resolveDefaultId(entries, llm["defaultId"]);
|
|
238
|
+
const defaultId = resolveDefaultId(sync.entries, llm["defaultId"]);
|
|
141
239
|
return {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
240
|
+
merged: {
|
|
241
|
+
...merged,
|
|
242
|
+
llm: {
|
|
243
|
+
...llm,
|
|
244
|
+
entries: sync.entries,
|
|
245
|
+
...defaultId === void 0 ? {} : { defaultId }
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
state: sync.state
|
|
148
249
|
};
|
|
149
250
|
}
|
|
150
251
|
/**
|
|
151
252
|
* `lastApplied` 缺席时每条分支都退化成「stored 存在就取 stored」,
|
|
152
253
|
* 即老实现的 `deepMerge(defaults, stored)`——修订跟随是纯增量,不改既有语义。
|
|
254
|
+
*
|
|
255
|
+
* 快照里的内部同步状态只在有烘焙模型时出现;它不是 `RuntimeConfig` 字段,
|
|
256
|
+
* 宿主照旧整存整取快照即可。
|
|
153
257
|
* @experimental
|
|
154
258
|
*/
|
|
155
259
|
function applyConfigDefaults(input) {
|
|
156
260
|
const { stored, defaults, lastApplied } = input;
|
|
261
|
+
const baked = applyBakedModels(stored === void 0 ? defaults : mergeLeaf(stored, defaults, lastApplied), stored, defaults, lastApplied);
|
|
157
262
|
return {
|
|
158
|
-
config: mergeRuntimeConfigDefaults(
|
|
159
|
-
snapshot: defaults
|
|
263
|
+
config: mergeRuntimeConfigDefaults(baked.merged),
|
|
264
|
+
snapshot: baked.state === void 0 ? defaults : {
|
|
265
|
+
...defaults,
|
|
266
|
+
[BAKED_SYNC_KEY]: baked.state
|
|
267
|
+
}
|
|
160
268
|
};
|
|
161
269
|
}
|
|
162
270
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3494,6 +3494,6 @@ declare function ErrorCard({ code, message, loopLimits, onOpenSettings, onDismis
|
|
|
3494
3494
|
* Version of the published `@webskill/chatbot` package, injected at build time.
|
|
3495
3495
|
* @stable
|
|
3496
3496
|
*/
|
|
3497
|
-
declare const CHATBOT_VERSION = "0.24.
|
|
3497
|
+
declare const CHATBOT_VERSION = "0.24.3";
|
|
3498
3498
|
//#endregion
|
|
3499
3499
|
export { A2uiSurfaceHost, type A2uiSurfaceHostProps, A2uiSurfaceSnapshotHost, type A2uiSurfaceSnapshotHostProps, type AppearanceChange, CHATBOT_VERSION, type ChatAttachmentInput, type ChatAttachmentMeta, type ChatComponent, type ChatComponentCallRecord, type ChatComponentConfirmation, type ChatComponentCredentialField, type ChatComponentInvokeContext, type ChatComponentOutcome, type ChatComponentStore, type ChatComponentText, type ChatContentPart, ChatEngine, type ChatEngineOptions, type ChatEvent, type ChatInteractionRecord, type ChatLayout, type ChatMessage, type ChatRunPhase, type ChatSessionListResult, type ChatSessionMeta, type ChatTheme, type ChatThinking, type ChatTokenUsage, type ChatToolCall, Chatbot, type ChatbotConfig, type ChatbotGovernancePorts, type ChatbotHostAdapter, type ChatbotProps, ChatbotVisionDelegate, type ChatbotVisionDelegateOptions, CompositeUiBridge, type CompositeUiBridgeDeps, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, type DownloadableFile, type DwgHost, ErrorCard, type ErrorCardProps, type HttpMessageComponentOptions, InteractionCard, type InteractionCardProps, InterruptedBanner, type InterruptedBannerProps, type Locale, type LocalizedText, OpenUiSurfaceHost, type OpenUiSurfaceHostProps, OpenUiSurfaceSnapshotHost, type OpenUiSurfaceSnapshotHostProps, type QuickPrompt, type QuickPromptIconName, type RendererCapability, type RendererKind, type ResolvedChatLayout, ResultBlockList, type ResultBlockListProps, ResultBlocksPro, type ResultBlocksProProps, type RunSnapshot, type RuntimeAppearanceConfig, type RuntimeConfig, type RuntimeConfigStore, type RuntimeQuickPrompt, type RuntimeRendererId, type SandboxExecutorDeps, type SettingsSectionId, SkillBadges, SpecInteraction, type SpecInteractionProps, VercelPayloadPreview, type VercelPayloadPreviewProps, VercelSurfaceHost, type VercelSurfaceHostProps, VercelSurfaceSnapshotHost, type VercelSurfaceSnapshotHostProps, type VisionDelegationConsent, type VisionDelegationEndpoint, WEB_OFFICE_TEMPLATE_PREFIX, chatbotDictionary, configureA2uiMarkdown, createHttpMessageComponent, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, isLlmEntryUsable, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };
|
package/dist/index.js
CHANGED
|
@@ -30180,6 +30180,45 @@ var ChatEngine = class {
|
|
|
30180
30180
|
*/
|
|
30181
30181
|
const hasTemplateEngine = Boolean(this.#adapter.xlsxTemplateEngine || this.#adapter.docxTemplateEngine);
|
|
30182
30182
|
const templateIdHints = [...this.#adapter.webOfficeTemplateSource ? [`For a document open in an online office viewer on the page, use "${WEB_OFFICE_TEMPLATE_PREFIX}<handle>" with the handle from list_weboffice_documents.`] : [], ...hasTemplateEngine && await this.#hasSkillResources(fs) ? [`For a file that ships inside an installed skill, use "${SKILL_FILE_PREFIX}<skill name>/<path inside the skill>", for example "${SKILL_FILE_PREFIX}quotation/assets/template.xlsx".`] : []];
|
|
30183
|
+
/**
|
|
30184
|
+
* 页面取像预算(0.27.1 分册 11)。
|
|
30185
|
+
*
|
|
30186
|
+
* 普通读页(`requested: false`)只认主模型自身能看图;显式 `images: true`
|
|
30187
|
+
* 才允许用可用的视觉委派兜底。两条路径共享同一份配置读取,避免数值漂移。
|
|
30188
|
+
*/
|
|
30189
|
+
const pageImageBudget = async (requested) => {
|
|
30190
|
+
const live = await this.#runtimeConfigStore()?.load();
|
|
30191
|
+
const maxImageBytes = live?.multimodal.maxImageBytes ?? 0;
|
|
30192
|
+
const maxImages = live?.multimodal.maxImagesPerMessage ?? 0;
|
|
30193
|
+
const minImageArea = live?.multimodal.minImageArea ?? 0;
|
|
30194
|
+
if (!(live?.multimodal.pageImageCapture ?? false)) return {
|
|
30195
|
+
enabled: false,
|
|
30196
|
+
maxImageBytes,
|
|
30197
|
+
maxImages,
|
|
30198
|
+
minImageArea,
|
|
30199
|
+
unavailableReason: "Page image capture is turned off in the host settings."
|
|
30200
|
+
};
|
|
30201
|
+
if (entryCapabilities(pickLlmEntry(live, this.#selectedModelId)).image) return {
|
|
30202
|
+
enabled: true,
|
|
30203
|
+
maxImageBytes,
|
|
30204
|
+
maxImages,
|
|
30205
|
+
minImageArea
|
|
30206
|
+
};
|
|
30207
|
+
if (!requested) return {
|
|
30208
|
+
enabled: false,
|
|
30209
|
+
maxImageBytes,
|
|
30210
|
+
maxImages,
|
|
30211
|
+
minImageArea
|
|
30212
|
+
};
|
|
30213
|
+
const delegated = await this.#visionDelegate?.applies() === true;
|
|
30214
|
+
return {
|
|
30215
|
+
enabled: delegated,
|
|
30216
|
+
maxImageBytes,
|
|
30217
|
+
maxImages,
|
|
30218
|
+
minImageArea,
|
|
30219
|
+
...delegated ? {} : { unavailableReason: "No image-capable model is configured. Select a multimodal model or add one in Console." }
|
|
30220
|
+
};
|
|
30221
|
+
};
|
|
30183
30222
|
const baseTools = [
|
|
30184
30223
|
...pageSkillSource ? [pageSkillSource] : [],
|
|
30185
30224
|
createSpreadsheetToolSource({
|
|
@@ -30210,15 +30249,8 @@ var ChatEngine = class {
|
|
|
30210
30249
|
...pagePerception ? [createPagePerceptionToolSource({
|
|
30211
30250
|
policy: pagePerception,
|
|
30212
30251
|
...this.#adapter.pagePerceptionPaging === void 0 ? {} : { paging: () => this.#adapter.pagePerceptionPaging },
|
|
30213
|
-
imageCapture:
|
|
30214
|
-
|
|
30215
|
-
return {
|
|
30216
|
-
enabled: (live?.multimodal.pageImageCapture ?? false) && entryCapabilities(pickLlmEntry(live, this.#selectedModelId)).image,
|
|
30217
|
-
maxImageBytes: live?.multimodal.maxImageBytes ?? 0,
|
|
30218
|
-
maxImages: live?.multimodal.maxImagesPerMessage ?? 0,
|
|
30219
|
-
minImageArea: live?.multimodal.minImageArea ?? 0
|
|
30220
|
-
};
|
|
30221
|
-
}
|
|
30252
|
+
imageCapture: () => pageImageBudget(false),
|
|
30253
|
+
imageCaptureForRequest: () => pageImageBudget(true)
|
|
30222
30254
|
})] : [],
|
|
30223
30255
|
...this.#adapter.pageActions ? [createPageActionToolSource({ policy: this.#adapter.pageActions })] : [],
|
|
30224
30256
|
...this.#adapter.pageImage ? [createPageImageToolSource({ capture: (input, context) => this.#capturePageImage(this.#adapter.pageImage, artifactStore, input, context?.runId) })] : [],
|
|
@@ -46820,7 +46852,7 @@ function VercelPayloadPreview({ bridge }) {
|
|
|
46820
46852
|
* Version of the published `@webskill/chatbot` package, injected at build time.
|
|
46821
46853
|
* @stable
|
|
46822
46854
|
*/
|
|
46823
|
-
const CHATBOT_VERSION = "0.24.
|
|
46855
|
+
const CHATBOT_VERSION = "0.24.3";
|
|
46824
46856
|
|
|
46825
46857
|
//#endregion
|
|
46826
46858
|
export { A2uiSurfaceHost, A2uiSurfaceSnapshotHost, CHATBOT_VERSION, ChatEngine, Chatbot, ChatbotVisionDelegate, CompositeUiBridge, DEFAULT_RENDERER_CAPABILITIES, DEFAULT_RUNTIME_CONFIG_STORAGE_KEY, ErrorCard, InteractionCard, InterruptedBanner, OpenUiSurfaceHost, OpenUiSurfaceSnapshotHost, ResultBlockList, ResultBlocksPro, SkillBadges, SpecInteraction, VercelPayloadPreview, VercelSurfaceHost, VercelSurfaceSnapshotHost, WEB_OFFICE_TEMPLATE_PREFIX, chatbotDictionary, configureA2uiMarkdown, createHttpMessageComponent, createLocalStorageRuntimeConfigStore, createMemoryRuntimeConfigStore, isLlmEntryUsable, pickUsableLlmEntry, probeA2uiAvailability, probeOpenUiAvailability, sandboxExecutorDeps, useT };
|
|
@@ -480,7 +480,8 @@ function parseModels(raw, secrets, root) {
|
|
|
480
480
|
"model",
|
|
481
481
|
"requestTimeoutMs",
|
|
482
482
|
"capabilities",
|
|
483
|
-
"thinkingBudgetTokens"
|
|
483
|
+
"thinkingBudgetTokens",
|
|
484
|
+
"contextWindow"
|
|
484
485
|
], path);
|
|
485
486
|
const id = readString(source["id"], `${path}.id`);
|
|
486
487
|
if (seen.has(id)) fail("CONFIG_REFERENCE", `${path}.id`, `${path}.id duplicates an earlier entry: ${id}`);
|
|
@@ -495,6 +496,7 @@ function parseModels(raw, secrets, root) {
|
|
|
495
496
|
if (source["baseUrl"] !== void 0) entry.baseUrl = readString(source["baseUrl"], `${path}.baseUrl`);
|
|
496
497
|
if (source["requestTimeoutMs"] !== void 0) entry.requestTimeoutMs = readInt(source["requestTimeoutMs"], `${path}.requestTimeoutMs`, LLM_ENTRY_BOUNDS.requestTimeoutMs);
|
|
497
498
|
if (source["thinkingBudgetTokens"] !== void 0) entry.thinkingBudgetTokens = readInt(source["thinkingBudgetTokens"], `${path}.thinkingBudgetTokens`);
|
|
499
|
+
if (source["contextWindow"] !== void 0) entry.contextWindow = readInt(source["contextWindow"], `${path}.contextWindow`, LLM_ENTRY_BOUNDS.contextWindow);
|
|
498
500
|
if (source["capabilities"] !== void 0) {
|
|
499
501
|
const caps = expectObject(source["capabilities"], `${path}.capabilities`);
|
|
500
502
|
rejectUnknownKeys(caps, ["tools", "image"], `${path}.capabilities`);
|
package/dist/vite.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webskill/chatbot",
|
|
3
|
-
"version": "0.24.
|
|
3
|
+
"version": "0.24.3",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"@a2ui/web_core": "^0.10.5",
|
|
39
39
|
"@lit/context": "^1.1.0",
|
|
40
40
|
"@openuidev/react-lang": "0.2.8",
|
|
41
|
-
"@webskill/sdk": "^0.
|
|
41
|
+
"@webskill/sdk": "^0.27.1",
|
|
42
42
|
"mermaid": "^12.0.0",
|
|
43
43
|
"react": ">=19.0.0",
|
|
44
44
|
"react-dom": ">=19.0.0",
|