bunnyquery 1.21.13 → 1.21.15
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 +23 -4
- package/bunnyquery.css +77 -44
- package/bunnyquery.js +411 -29
- package/dist/engine.cjs +341 -13
- package/dist/engine.cjs.map +1 -1
- package/dist/engine.d.mts +88 -1
- package/dist/engine.d.ts +88 -1
- package/dist/engine.mjs +335 -14
- package/dist/engine.mjs.map +1 -1
- package/package.json +1 -1
- package/src/engine/activity.ts +253 -0
- package/src/engine/index.ts +8 -0
- package/src/engine/prompts/chat_system_prompt.ts +1 -1
- package/src/engine/requests.ts +58 -0
- package/src/engine/session.ts +5 -0
- package/src/engine/sse.ts +110 -3
- package/src/widget.css +71 -44
- package/styles/chat.css +6 -0
package/dist/engine.mjs
CHANGED
|
@@ -1074,7 +1074,7 @@ function buildChatSystemPrompt(params) {
|
|
|
1074
1074
|
const indexGroupLiteral = typeof g === "number" ? String(g) : g === "public" || g === "private" || g === "authorized" || g === "admin" ? `"${g}"` : '"authorized"';
|
|
1075
1075
|
const reindexHint = canUpload === false ? `asking the project's owner to re-index that file` : client === "console" ? `re-indexing that file (select it on the Files page and choose Reindex)` : `re-indexing that file (attach the same file again and choose to reindex it)`;
|
|
1076
1076
|
const groundingRules = `ANSWER ONLY FROM THE DATA. Every fact you state about this project's data - a name, a number, a date, a status, what a document says, whether something exists - must come from one of four places: a tool result returned in THIS conversation, a file or image attached to it (including one you read through its attachment link), the project description at the end of this prompt, or what the user told you themselves in this chat. Your general knowledge, the open internet and a plausible guess are NOT sources. Never use them to answer a question about the user's data, to fill a gap in it, or to complete a record that came back partial. A value that is not in what you retrieved is unknown: say it is not in the data instead of supplying a likely one.
|
|
1077
|
-
FILES IN ANOTHER LANGUAGE. The files may be written in another language than the question (a Russian or English manual asked about in Korean). When searches in the question's language find nothing, or searchText reports query_language_mismatch, search again with the question's key terms translated into the language the files
|
|
1077
|
+
FILES IN ANOTHER LANGUAGE. The files may be written in another language than the question, in another alphabet or in the same one (a Russian or English manual asked about in Korean, German documents asked about in English). When searches in the question's language find nothing, or searchText reports query_language_mismatch (its text_language names the files' language), search again with the question's key terms translated into the language the files' TEXT is in: searchText names that language for each file ("its text is in German"; only when it cannot tell, the alphabet, "Latin script, e.g. English"), and earlier hits show it; passing the question as the DOCUMENTS rule says lets searchText tell the question's language; a file NAME can be in another language than its text (a "\u0420\u042D" manual written in English), so go by the text. One or two short queries of the main terms (e.g. "oil leak", "gearbox"), and if the first translation finds nothing, try the other likely language (English is the most common for technical manuals), before concluding anything.
|
|
1078
1078
|
WHEN THE DATA DOES NOT HAVE IT, SAY SO. Once you have searched the way these rules require (in the files' language too) and nothing answers the question, tell the user plainly, in their language, that this project's data does not contain it, and say what you searched (the tables, files or terms) so they can tell missing data from a missed search. Do not answer from memory instead, and do not turn a missing answer into a general explanation of the topic. Offer what would let you answer it: ${canUpload === false ? `another name or file to look under, or asking the project's owner to add it` : `the document to upload, or another name or file to look under`}.
|
|
1079
1079
|
A CODE, NUMBER OR EXACT QUOTE THAT searchText DID NOT FIND (an identifier or a quote, not a topic or how-to question, which follows FILES IN ANOTHER LANGUAGE first): when it answers search_complete with no hit, and what its message says was NOT searched has been checked as it says (the skipped_without_page_text files; the records ONLY when the value could be a spreadsheet cell or a row, and then with ONE filtered getRecords on that value, never by paging through a whole table), keep the answer short. The text read from photos, scans and other images IS in the page text searchText covered, so a code, serial or phrase asked about a photo needs no records read: say plainly that it was not found, name what was searched (the file, and its pages when you searched only some of them, or files_searched files and total_pages_searched pages), and when a recently uploaded file or a photo should hold it, suggest ${reindexHint}, since small or handwritten characters can be misread at indexing. Never present a different file as the match, and never guess the value.
|
|
1080
1080
|
KEEP WHAT THE DATA SAYS APART FROM WHAT YOU WORKED OUT. A total you computed, a comparison, a trend, an interpretation or a recommendation is yours, not the data's: label it as such ("calculated from...", "this suggests...") and name the rows or files it was made from. Never present an estimate, an assumption or an inference as something the data states.
|
|
@@ -2916,6 +2916,7 @@ async function notifyAgentSaveAttachment(info) {
|
|
|
2916
2916
|
...shareIdentical ? { share_identical: true } : {}
|
|
2917
2917
|
}]
|
|
2918
2918
|
} : {};
|
|
2919
|
+
const groupHeader = info.fileGroup && attachment.storagePath ? fileGroupHeader(attachment.storagePath) : {};
|
|
2919
2920
|
const userMessage = visionFile && renderPlaceholder ? buildIndexingRenderMessage(attachment, renderPlaceholder, renderFrom) : windowedRead && windowPlaceholder ? buildIndexingWindowMessage(attachment, windowPlaceholder, false) : continuing ? buildIndexingContinueMessage(attachment) : buildIndexingUserMessage(
|
|
2920
2921
|
attachment,
|
|
2921
2922
|
parsedContent ? { inlineContent: parsedContent } : placeholder ? { inlineContentPlaceholder: placeholder } : pagedRead ? { pagedRead: true } : imageFile ? { imageFile } : void 0
|
|
@@ -2948,7 +2949,8 @@ async function notifyAgentSaveAttachment(info) {
|
|
|
2948
2949
|
method: "POST",
|
|
2949
2950
|
headers: {
|
|
2950
2951
|
"content-type": "application/json",
|
|
2951
|
-
Authorization: "Bearer $CLIENT_SECRET"
|
|
2952
|
+
Authorization: "Bearer $CLIENT_SECRET",
|
|
2953
|
+
...groupHeader
|
|
2952
2954
|
},
|
|
2953
2955
|
data: {
|
|
2954
2956
|
model: resolvedModel2,
|
|
@@ -2998,7 +3000,8 @@ async function notifyAgentSaveAttachment(info) {
|
|
|
2998
3000
|
"content-type": "application/json",
|
|
2999
3001
|
"x-api-key": "$CLIENT_SECRET",
|
|
3000
3002
|
"anthropic-version": ANTHROPIC_VERSION,
|
|
3001
|
-
"anthropic-beta": ANTHROPIC_BETA_HEADER
|
|
3003
|
+
"anthropic-beta": ANTHROPIC_BETA_HEADER,
|
|
3004
|
+
...groupHeader
|
|
3002
3005
|
},
|
|
3003
3006
|
data: {
|
|
3004
3007
|
model: resolvedModel,
|
|
@@ -3157,6 +3160,57 @@ function upsertIndexRunRecordSafe(service, storagePath, patch, opts) {
|
|
|
3157
3160
|
return void 0;
|
|
3158
3161
|
});
|
|
3159
3162
|
}
|
|
3163
|
+
var FILE_GROUP_HEADER = "x-bq-file-group";
|
|
3164
|
+
function fileGroupHeader(groupKey) {
|
|
3165
|
+
return groupKey ? { [FILE_GROUP_HEADER]: sha1Hex(groupKey) } : {};
|
|
3166
|
+
}
|
|
3167
|
+
function sha1Hex(text) {
|
|
3168
|
+
const bytes = new TextEncoder().encode(String(text));
|
|
3169
|
+
const bitLen = bytes.length * 8;
|
|
3170
|
+
const words = new Uint32Array(((bytes.length + 8 >> 6) + 1) * 16);
|
|
3171
|
+
for (let i = 0; i < bytes.length; i++) words[i >> 2] |= bytes[i] << 24 - i % 4 * 8;
|
|
3172
|
+
words[bytes.length >> 2] |= 128 << 24 - bytes.length % 4 * 8;
|
|
3173
|
+
words[words.length - 1] = bitLen >>> 0;
|
|
3174
|
+
words[words.length - 2] = Math.floor(bitLen / 4294967296);
|
|
3175
|
+
let h0 = 1732584193, h1 = 4023233417, h2 = 2562383102, h3 = 271733878, h4 = 3285377520;
|
|
3176
|
+
const w = new Uint32Array(80);
|
|
3177
|
+
for (let off = 0; off < words.length; off += 16) {
|
|
3178
|
+
for (let t = 0; t < 16; t++) w[t] = words[off + t];
|
|
3179
|
+
for (let t = 16; t < 80; t++) {
|
|
3180
|
+
const x = w[t - 3] ^ w[t - 8] ^ w[t - 14] ^ w[t - 16];
|
|
3181
|
+
w[t] = x << 1 | x >>> 31;
|
|
3182
|
+
}
|
|
3183
|
+
let a = h0, b = h1, c = h2, d = h3, e = h4;
|
|
3184
|
+
for (let t = 0; t < 80; t++) {
|
|
3185
|
+
let f, k;
|
|
3186
|
+
if (t < 20) {
|
|
3187
|
+
f = b & c | ~b & d;
|
|
3188
|
+
k = 1518500249;
|
|
3189
|
+
} else if (t < 40) {
|
|
3190
|
+
f = b ^ c ^ d;
|
|
3191
|
+
k = 1859775393;
|
|
3192
|
+
} else if (t < 60) {
|
|
3193
|
+
f = b & c | b & d | c & d;
|
|
3194
|
+
k = 2400959708;
|
|
3195
|
+
} else {
|
|
3196
|
+
f = b ^ c ^ d;
|
|
3197
|
+
k = 3395469782;
|
|
3198
|
+
}
|
|
3199
|
+
const tmp = (a << 5 | a >>> 27) + f + e + k + w[t] >>> 0;
|
|
3200
|
+
e = d;
|
|
3201
|
+
d = c;
|
|
3202
|
+
c = b << 30 | b >>> 2;
|
|
3203
|
+
b = a;
|
|
3204
|
+
a = tmp;
|
|
3205
|
+
}
|
|
3206
|
+
h0 = h0 + a >>> 0;
|
|
3207
|
+
h1 = h1 + b >>> 0;
|
|
3208
|
+
h2 = h2 + c >>> 0;
|
|
3209
|
+
h3 = h3 + d >>> 0;
|
|
3210
|
+
h4 = h4 + e >>> 0;
|
|
3211
|
+
}
|
|
3212
|
+
return [h0, h1, h2, h3, h4].map((v) => (v >>> 0).toString(16).padStart(8, "0")).join("");
|
|
3213
|
+
}
|
|
3160
3214
|
function bgIndexingQueueName(userId, service) {
|
|
3161
3215
|
return (userId || service || "") + BG_INDEXING_QUEUE_SUFFIX;
|
|
3162
3216
|
}
|
|
@@ -4812,6 +4866,7 @@ function createSseParser() {
|
|
|
4812
4866
|
var error = null;
|
|
4813
4867
|
var stopReason = null;
|
|
4814
4868
|
var toolCalls = [];
|
|
4869
|
+
var argBuf = {};
|
|
4815
4870
|
var malformedFrames = 0;
|
|
4816
4871
|
var malformedToolJson = 0;
|
|
4817
4872
|
var message = null;
|
|
@@ -4934,7 +4989,10 @@ function createSseParser() {
|
|
|
4934
4989
|
type: block.type
|
|
4935
4990
|
};
|
|
4936
4991
|
if (typeof block.server_name === "string") call.serverName = block.server_name;
|
|
4992
|
+
if (typeof block.id === "string" && block.id) call.id = block.id;
|
|
4937
4993
|
toolCalls.push(call);
|
|
4994
|
+
} else if (block && typeof block.type === "string") {
|
|
4995
|
+
markClaudeCallsDone(block);
|
|
4938
4996
|
}
|
|
4939
4997
|
return;
|
|
4940
4998
|
}
|
|
@@ -4958,6 +5016,10 @@ function createSseParser() {
|
|
|
4958
5016
|
var j = numberOr(ev.index, -1);
|
|
4959
5017
|
var s = j >= 0 ? blocks.get(j) : void 0;
|
|
4960
5018
|
if (s && s.sawJson) finishToolJson(s);
|
|
5019
|
+
if (s && s.block && s.block.input && typeof s.block.input === "object") {
|
|
5020
|
+
var sc = callAt(j);
|
|
5021
|
+
if (sc) sc.input = s.block.input;
|
|
5022
|
+
}
|
|
4961
5023
|
return;
|
|
4962
5024
|
}
|
|
4963
5025
|
if (type === "message_delta") {
|
|
@@ -5018,6 +5080,34 @@ function createSseParser() {
|
|
|
5018
5080
|
malformedToolJson++;
|
|
5019
5081
|
}
|
|
5020
5082
|
}
|
|
5083
|
+
function callAt(index) {
|
|
5084
|
+
for (var k = toolCalls.length - 1; k >= 0; k--) {
|
|
5085
|
+
if (toolCalls[k].index === index) return toolCalls[k];
|
|
5086
|
+
}
|
|
5087
|
+
return null;
|
|
5088
|
+
}
|
|
5089
|
+
function markClaudeCallsDone(block) {
|
|
5090
|
+
var t = block.type;
|
|
5091
|
+
if (/tool_result$/.test(t)) {
|
|
5092
|
+
var ref = typeof block.tool_use_id === "string" ? block.tool_use_id : "";
|
|
5093
|
+
for (var k = 0; k < toolCalls.length; k++) {
|
|
5094
|
+
if (ref && toolCalls[k].id === ref) toolCalls[k].done = true;
|
|
5095
|
+
}
|
|
5096
|
+
return;
|
|
5097
|
+
}
|
|
5098
|
+
if (t === "text" || t === "thinking" || t === "redacted_thinking") {
|
|
5099
|
+
for (var m = 0; m < toolCalls.length; m++) toolCalls[m].done = true;
|
|
5100
|
+
}
|
|
5101
|
+
}
|
|
5102
|
+
function parseArgs(args) {
|
|
5103
|
+
if (args && typeof args === "object") return args;
|
|
5104
|
+
if (typeof args !== "string" || !args) return void 0;
|
|
5105
|
+
try {
|
|
5106
|
+
return JSON.parse(args);
|
|
5107
|
+
} catch (e) {
|
|
5108
|
+
return void 0;
|
|
5109
|
+
}
|
|
5110
|
+
}
|
|
5021
5111
|
function deltaBlockType(deltaType) {
|
|
5022
5112
|
if (deltaType === "thinking_delta" || deltaType === "signature_delta") return "thinking";
|
|
5023
5113
|
if (deltaType === "input_json_delta") return "tool_use";
|
|
@@ -5051,13 +5141,54 @@ function createSseParser() {
|
|
|
5051
5141
|
if (type === "response.output_item.added") {
|
|
5052
5142
|
var item = ev.item;
|
|
5053
5143
|
if (item && typeof item.type === "string" && OPENAI_TOOL_ITEMS[item.type]) {
|
|
5054
|
-
|
|
5144
|
+
var oc = {
|
|
5055
5145
|
index: numberOr(ev.output_index, toolCalls.length),
|
|
5056
5146
|
// A built-in tool (web_search_call) has no name of its own, so the item
|
|
5057
5147
|
// type is the only label there is and a row can still be drawn.
|
|
5058
5148
|
name: typeof item.name === "string" && item.name ? item.name : item.type,
|
|
5059
5149
|
type: item.type
|
|
5060
|
-
}
|
|
5150
|
+
};
|
|
5151
|
+
if (typeof item.id === "string" && item.id) oc.id = item.id;
|
|
5152
|
+
var oa = parseArgs(item.arguments);
|
|
5153
|
+
if (oa !== void 0) oc.input = oa;
|
|
5154
|
+
toolCalls.push(oc);
|
|
5155
|
+
}
|
|
5156
|
+
return;
|
|
5157
|
+
}
|
|
5158
|
+
if (type === "response.mcp_call_arguments.delta" || type === "response.function_call_arguments.delta") {
|
|
5159
|
+
var gi = numberOr(ev.output_index, -1);
|
|
5160
|
+
var gc = callAt(gi);
|
|
5161
|
+
if (gc && gc.input === void 0 && typeof ev.delta === "string") {
|
|
5162
|
+
argBuf[gi] = (argBuf[gi] || "") + ev.delta;
|
|
5163
|
+
var gt = argBuf[gi].trim();
|
|
5164
|
+
if (gt.charAt(gt.length - 1) === "}") {
|
|
5165
|
+
var ga = parseArgs(gt);
|
|
5166
|
+
if (ga !== void 0) gc.input = ga;
|
|
5167
|
+
}
|
|
5168
|
+
}
|
|
5169
|
+
return;
|
|
5170
|
+
}
|
|
5171
|
+
if (type === "response.mcp_call_arguments.done" || type === "response.function_call_arguments.done") {
|
|
5172
|
+
var ac = callAt(numberOr(ev.output_index, -1));
|
|
5173
|
+
var aa = parseArgs(ev.arguments);
|
|
5174
|
+
if (ac && aa !== void 0) ac.input = aa;
|
|
5175
|
+
return;
|
|
5176
|
+
}
|
|
5177
|
+
if (type === "response.mcp_call.completed" || type === "response.mcp_call.failed") {
|
|
5178
|
+
var cc = callAt(numberOr(ev.output_index, -1));
|
|
5179
|
+
if (cc) cc.done = true;
|
|
5180
|
+
return;
|
|
5181
|
+
}
|
|
5182
|
+
if (type === "response.output_item.done") {
|
|
5183
|
+
var di = ev.item;
|
|
5184
|
+
if (di && typeof di.type === "string" && OPENAI_TOOL_ITEMS[di.type]) {
|
|
5185
|
+
var dc = callAt(numberOr(ev.output_index, -1));
|
|
5186
|
+
if (dc) {
|
|
5187
|
+
var da = parseArgs(di.arguments);
|
|
5188
|
+
if (da !== void 0) dc.input = da;
|
|
5189
|
+
else if (di.action && typeof di.action === "object" && dc.input === void 0) dc.input = di.action;
|
|
5190
|
+
dc.done = true;
|
|
5191
|
+
}
|
|
5061
5192
|
}
|
|
5062
5193
|
return;
|
|
5063
5194
|
}
|
|
@@ -5208,7 +5339,12 @@ function createSseParser() {
|
|
|
5208
5339
|
provider,
|
|
5209
5340
|
text: currentText(),
|
|
5210
5341
|
thinkingText: currentThinking(),
|
|
5211
|
-
|
|
5342
|
+
// Copied per call, not just per array: a call's input/done fill in after it
|
|
5343
|
+
// is first seen, and a snapshot already handed out must not change under
|
|
5344
|
+
// its reader.
|
|
5345
|
+
toolCalls: toolCalls.map(function(t) {
|
|
5346
|
+
return Object.assign({}, t);
|
|
5347
|
+
}),
|
|
5212
5348
|
toolNames: toolCalls.map(function(t) {
|
|
5213
5349
|
return t.name;
|
|
5214
5350
|
}),
|
|
@@ -5262,6 +5398,190 @@ function mergeInto(target, src) {
|
|
|
5262
5398
|
return target;
|
|
5263
5399
|
}
|
|
5264
5400
|
|
|
5401
|
+
// src/engine/activity.ts
|
|
5402
|
+
var CHAT_ACTIVITY_ROTATE_MS = 4e3;
|
|
5403
|
+
var byItem = /* @__PURE__ */ new Map();
|
|
5404
|
+
var startByObj = /* @__PURE__ */ new WeakMap();
|
|
5405
|
+
var startById = /* @__PURE__ */ new Map();
|
|
5406
|
+
var MAX_IDS = 200;
|
|
5407
|
+
function remember(map, key, value) {
|
|
5408
|
+
if (map.has(key)) map.delete(key);
|
|
5409
|
+
map.set(key, value);
|
|
5410
|
+
if (map.size > MAX_IDS) {
|
|
5411
|
+
var oldest = map.keys().next();
|
|
5412
|
+
if (!oldest.done) map.delete(oldest.value);
|
|
5413
|
+
}
|
|
5414
|
+
}
|
|
5415
|
+
function stepOf(snap) {
|
|
5416
|
+
if (!snap) return { step: "thinking", count: 0 };
|
|
5417
|
+
var calls = Array.isArray(snap.toolCalls) ? snap.toolCalls : [];
|
|
5418
|
+
if (typeof snap.text === "string" && /\S/.test(snap.text)) return { step: "writing", count: calls.length };
|
|
5419
|
+
if (!calls.length) return { step: "thinking", count: 0 };
|
|
5420
|
+
var last = calls[calls.length - 1];
|
|
5421
|
+
if (last && !last.done) return { step: "tool", call: last, count: calls.length };
|
|
5422
|
+
return { step: "between", count: calls.length };
|
|
5423
|
+
}
|
|
5424
|
+
function noteChatActivity(serverItemId, snap, now) {
|
|
5425
|
+
if (!serverItemId) return;
|
|
5426
|
+
var t = typeof now === "number" ? now : Date.now();
|
|
5427
|
+
var s = stepOf(snap);
|
|
5428
|
+
var key = s.step + ":" + s.count;
|
|
5429
|
+
var prev = byItem.get(serverItemId);
|
|
5430
|
+
if (prev && prev.key === key) {
|
|
5431
|
+
if (s.call && s.call.input !== void 0 && prev.input === void 0) prev.input = s.call.input;
|
|
5432
|
+
return;
|
|
5433
|
+
}
|
|
5434
|
+
var act = { step: s.step, since: t, key };
|
|
5435
|
+
if (s.call) {
|
|
5436
|
+
act.tool = s.call.name;
|
|
5437
|
+
if (s.call.input !== void 0) act.input = s.call.input;
|
|
5438
|
+
}
|
|
5439
|
+
remember(byItem, serverItemId, act);
|
|
5440
|
+
}
|
|
5441
|
+
function chatActivityOf(msg) {
|
|
5442
|
+
var id = msg && typeof msg._serverItemId === "string" ? msg._serverItemId : "";
|
|
5443
|
+
return id && byItem.get(id) || null;
|
|
5444
|
+
}
|
|
5445
|
+
function turnStart(msg, now) {
|
|
5446
|
+
var ids = [];
|
|
5447
|
+
if (msg && typeof msg._serverItemId === "string" && msg._serverItemId) ids.push(msg._serverItemId);
|
|
5448
|
+
if (msg && typeof msg._localId === "string" && msg._localId) ids.push(msg._localId);
|
|
5449
|
+
var t;
|
|
5450
|
+
if (msg && typeof msg === "object") t = startByObj.get(msg);
|
|
5451
|
+
for (var i = 0; t === void 0 && i < ids.length; i++) t = startById.get(ids[i]);
|
|
5452
|
+
if (t === void 0) t = now;
|
|
5453
|
+
if (msg && typeof msg === "object") startByObj.set(msg, t);
|
|
5454
|
+
for (var j = 0; j < ids.length; j++) if (startById.get(ids[j]) !== t) remember(startById, ids[j], t);
|
|
5455
|
+
return t;
|
|
5456
|
+
}
|
|
5457
|
+
function langOf(lang) {
|
|
5458
|
+
return typeof lang === "string" && /^ko\b/i.test(lang) ? "ko" : "en";
|
|
5459
|
+
}
|
|
5460
|
+
function clip(v, max) {
|
|
5461
|
+
if (typeof v !== "string") return "";
|
|
5462
|
+
var s = v.replace(/\s+/g, " ").trim();
|
|
5463
|
+
if (s.length > max) s = s.slice(0, max - 1).trim() + "\u2026";
|
|
5464
|
+
return s;
|
|
5465
|
+
}
|
|
5466
|
+
function fileName(v) {
|
|
5467
|
+
if (typeof v !== "string" || !v) return "";
|
|
5468
|
+
var s = v.replace(/^(src::|db:)/, "");
|
|
5469
|
+
var parts = s.split("/").filter(function(p) {
|
|
5470
|
+
return !!p;
|
|
5471
|
+
});
|
|
5472
|
+
return clip(parts.length ? parts[parts.length - 1] : s, 40);
|
|
5473
|
+
}
|
|
5474
|
+
var T = {
|
|
5475
|
+
en: {
|
|
5476
|
+
thinking: ["Reading your question", "Thinking about where to look", "Planning the search", "Still thinking, this can take a moment", "Working out the best way to find it", "Getting ready to look through your data"],
|
|
5477
|
+
between: ["Looking at what it found", "Deciding what to check next", "Putting the pieces together", "Checking that it has what it needs", "Still working on it"],
|
|
5478
|
+
writing: ["Writing the answer"],
|
|
5479
|
+
still: "Still working on it",
|
|
5480
|
+
working: "Working"
|
|
5481
|
+
},
|
|
5482
|
+
ko: {
|
|
5483
|
+
thinking: ["\uC9C8\uBB38\uC744 \uC77D\uB294 \uC911", "\uC5B4\uB514\uB97C \uCC3E\uC544\uBCFC\uC9C0 \uC0DD\uAC01\uD558\uB294 \uC911", "\uAC80\uC0C9 \uBC29\uBC95\uC744 \uC815\uD558\uB294 \uC911", "\uC544\uC9C1 \uC0DD\uAC01\uD558\uB294 \uC911, \uC7A0\uC2DC\uB9CC \uAE30\uB2E4\uB824 \uC8FC\uC138\uC694", "\uAC00\uC7A5 \uC88B\uC740 \uBC29\uBC95\uC744 \uCC3E\uB294 \uC911", "\uB370\uC774\uD130\uB97C \uC0B4\uD3B4\uBCFC \uC900\uBE44\uB97C \uD558\uB294 \uC911"],
|
|
5484
|
+
between: ["\uCC3E\uC740 \uB0B4\uC6A9\uC744 \uC0B4\uD3B4\uBCF4\uB294 \uC911", "\uB2E4\uC74C\uC5D0 \uD655\uC778\uD560 \uAC83\uC744 \uC815\uD558\uB294 \uC911", "\uB0B4\uC6A9\uC744 \uC815\uB9AC\uD558\uB294 \uC911", "\uD544\uC694\uD55C \uB0B4\uC6A9\uC774 \uB2E4 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uB294 \uC911", "\uC544\uC9C1 \uC791\uC5C5 \uC911"],
|
|
5485
|
+
writing: ["\uB2F5\uBCC0\uC744 \uC791\uC131\uD558\uB294 \uC911"],
|
|
5486
|
+
still: "\uC544\uC9C1 \uC791\uC5C5 \uC911",
|
|
5487
|
+
working: "\uC791\uC5C5 \uC911"
|
|
5488
|
+
}
|
|
5489
|
+
};
|
|
5490
|
+
function toolLines(tool, i, lang) {
|
|
5491
|
+
var ko = lang === "ko";
|
|
5492
|
+
var inp = i && typeof i === "object" ? i : {};
|
|
5493
|
+
var q = clip(inp.query || inp.question, 40);
|
|
5494
|
+
var f = fileName(inp.path);
|
|
5495
|
+
var tbl = clip(inp.table_name, 30);
|
|
5496
|
+
switch (tool) {
|
|
5497
|
+
case "searchText":
|
|
5498
|
+
return ko ? [
|
|
5499
|
+
q ? f ? f + '\uC5D0\uC11C "' + q + '" \uCC3E\uB294 \uC911' : '\uD30C\uC77C\uC5D0\uC11C "' + q + '" \uCC3E\uB294 \uC911' : "\uD30C\uC77C\uC5D0\uC11C \uCC3E\uB294 \uC911",
|
|
5500
|
+
"\uBAA8\uB4E0 \uD398\uC774\uC9C0\uB97C \uD655\uC778\uD558\uB294 \uC911",
|
|
5501
|
+
"\uC544\uC9C1 \uCC3E\uB294 \uC911, \uD070 \uD504\uB85C\uC81D\uD2B8\uB294 \uC870\uAE08 \uB354 \uAC78\uB824\uC694",
|
|
5502
|
+
"\uACC4\uC18D \uCC3E\uB294 \uC911, \uAE30\uB2E4\uB824 \uC8FC\uC154\uC11C \uAC10\uC0AC\uD574\uC694"
|
|
5503
|
+
] : [
|
|
5504
|
+
q ? f ? "Searching " + f + ' for "' + q + '"' : 'Searching your files for "' + q + '"' : "Searching your files",
|
|
5505
|
+
"Checking every page",
|
|
5506
|
+
"Still searching, big projects take a bit longer",
|
|
5507
|
+
"Still searching, thanks for waiting"
|
|
5508
|
+
];
|
|
5509
|
+
case "readFileContent":
|
|
5510
|
+
return ko ? [
|
|
5511
|
+
f ? f + " \uC77D\uB294 \uC911" : "\uD30C\uC77C\uC744 \uC77D\uB294 \uC911",
|
|
5512
|
+
"\uD398\uC774\uC9C0\uB97C \uC0B4\uD3B4\uBCF4\uB294 \uC911",
|
|
5513
|
+
"\uC544\uC9C1 \uC77D\uB294 \uC911, \uAE34 \uD30C\uC77C\uC740 \uC870\uAE08 \uB354 \uAC78\uB824\uC694"
|
|
5514
|
+
] : [
|
|
5515
|
+
f ? "Reading " + f : "Reading a file",
|
|
5516
|
+
"Going through the pages",
|
|
5517
|
+
"Still reading, long files take a bit longer"
|
|
5518
|
+
];
|
|
5519
|
+
case "getFileOutline":
|
|
5520
|
+
return ko ? [f ? f + " \uAD6C\uC131\uC744 \uC0B4\uD3B4\uBCF4\uB294 \uC911" : "\uD30C\uC77C \uAD6C\uC131\uC744 \uC0B4\uD3B4\uBCF4\uB294 \uC911", "\uBAA9\uCC28\uB97C \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : [f ? "Looking at how " + f + " is laid out" : "Looking at how the file is laid out", "Checking the table of contents", T.en.still];
|
|
5521
|
+
case "getRecords":
|
|
5522
|
+
return ko ? [
|
|
5523
|
+
tbl ? tbl + " \uD14C\uC774\uBE14\uC5D0\uC11C \uAE30\uB85D\uC744 \uCC3E\uB294 \uC911" : "\uAE30\uB85D\uC744 \uCC3E\uB294 \uC911",
|
|
5524
|
+
"\uD589\uC744 \uC0B4\uD3B4\uBCF4\uB294 \uC911",
|
|
5525
|
+
"\uC544\uC9C1 \uCC3E\uB294 \uC911, \uD070 \uD14C\uC774\uBE14\uC740 \uC870\uAE08 \uB354 \uAC78\uB824\uC694"
|
|
5526
|
+
] : [
|
|
5527
|
+
tbl ? "Looking up records in " + tbl : "Looking up records",
|
|
5528
|
+
"Going through the rows",
|
|
5529
|
+
"Still looking, big tables take a bit longer"
|
|
5530
|
+
];
|
|
5531
|
+
case "exportRecordsToFile":
|
|
5532
|
+
return ko ? [tbl ? tbl + " \uAE30\uB85D\uC744 \uD30C\uC77C\uB85C \uB9CC\uB4DC\uB294 \uC911" : "\uAE30\uB85D\uC744 \uD30C\uC77C\uB85C \uB9CC\uB4DC\uB294 \uC911", "\uD30C\uC77C\uC744 \uB9CC\uB4DC\uB294 \uC911", "\uC544\uC9C1 \uB9CC\uB4DC\uB294 \uC911, \uD070 \uD14C\uC774\uBE14\uC740 \uC870\uAE08 \uB354 \uAC78\uB824\uC694"] : [tbl ? "Exporting records from " + tbl : "Exporting records", "Building the file", "Still exporting, big tables take a bit longer"];
|
|
5533
|
+
case "writeReport":
|
|
5534
|
+
return ko ? ["\uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD558\uB294 \uC911", "\uC544\uC9C1 \uC791\uC131\uD558\uB294 \uC911, \uAE34 \uBCF4\uACE0\uC11C\uB294 \uC870\uAE08 \uB354 \uAC78\uB824\uC694"] : ["Writing the report", "Still writing, long reports take a bit longer"];
|
|
5535
|
+
case "getTables":
|
|
5536
|
+
return ko ? ["\uC5B4\uB5A4 \uD14C\uC774\uBE14\uC774 \uC788\uB294\uC9C0 \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking which tables there are", T.en.still];
|
|
5537
|
+
case "getTags":
|
|
5538
|
+
return ko ? ["\uD0DC\uADF8\uB97C \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking tags", T.en.still];
|
|
5539
|
+
case "getIndexes":
|
|
5540
|
+
return ko ? ["\uD14C\uC774\uBE14 \uD56D\uBAA9\uC744 \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking the table's fields", T.en.still];
|
|
5541
|
+
case "getUniqueId":
|
|
5542
|
+
return ko ? ["\uB808\uCF54\uB4DC ID\uB97C \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking record IDs", T.en.still];
|
|
5543
|
+
case "postRecords":
|
|
5544
|
+
return ko ? ["\uAE30\uB85D\uC744 \uC800\uC7A5\uD558\uB294 \uC911", T.ko.still] : ["Saving records", T.en.still];
|
|
5545
|
+
case "updateRecords":
|
|
5546
|
+
return ko ? ["\uAE30\uB85D\uC744 \uC218\uC815\uD558\uB294 \uC911", T.ko.still] : ["Updating records", T.en.still];
|
|
5547
|
+
case "deleteRecords":
|
|
5548
|
+
return ko ? ["\uAE30\uB85D\uC744 \uC0AD\uC81C\uD558\uB294 \uC911", T.ko.still] : ["Deleting records", T.en.still];
|
|
5549
|
+
case "getTemporaryUrl":
|
|
5550
|
+
return ko ? [f ? f + " \uB9C1\uD06C\uB97C \uB9CC\uB4DC\uB294 \uC911" : "\uB9C1\uD06C\uB97C \uB9CC\uB4DC\uB294 \uC911", T.ko.still] : [f ? "Getting a link to " + f : "Getting a link", T.en.still];
|
|
5551
|
+
case "getToolResponsePage":
|
|
5552
|
+
return ko ? ["\uACB0\uACFC\uC758 \uB2E4\uC74C \uBD80\uBD84\uC744 \uC77D\uB294 \uC911", T.ko.still] : ["Reading the next part of the results", T.en.still];
|
|
5553
|
+
case "correctSearchLink":
|
|
5554
|
+
return ko ? ["\uD398\uC774\uC9C0 \uB9C1\uD06C\uB97C \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking the page link", T.en.still];
|
|
5555
|
+
case "getProjectInfos":
|
|
5556
|
+
return ko ? ["\uD504\uB85C\uC81D\uD2B8 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking the project details", T.en.still];
|
|
5557
|
+
case "getProfile":
|
|
5558
|
+
return ko ? ["\uACC4\uC815 \uC815\uBCF4\uB97C \uD655\uC778\uD558\uB294 \uC911", T.ko.still] : ["Checking your account", T.en.still];
|
|
5559
|
+
case "web_search":
|
|
5560
|
+
case "web_search_call":
|
|
5561
|
+
return ko ? ["\uC6F9\uC5D0\uC11C \uCC3E\uB294 \uC911", T.ko.still] : ["Searching the web", T.en.still];
|
|
5562
|
+
default:
|
|
5563
|
+
return ko ? [T.ko.working, T.ko.still] : [T.en.working, T.en.still];
|
|
5564
|
+
}
|
|
5565
|
+
}
|
|
5566
|
+
function pick(lines, elapsed, loopFrom) {
|
|
5567
|
+
var n = Math.floor(Math.max(0, elapsed) / CHAT_ACTIVITY_ROTATE_MS);
|
|
5568
|
+
if (n < lines.length) return lines[n];
|
|
5569
|
+
var from = Math.min(Math.max(0, loopFrom || 0), lines.length - 1);
|
|
5570
|
+
var span = lines.length - from;
|
|
5571
|
+
return lines[from + (n - lines.length) % span];
|
|
5572
|
+
}
|
|
5573
|
+
function chatActivityLine(msg, now, lang) {
|
|
5574
|
+
var t = typeof now === "number" ? now : Date.now();
|
|
5575
|
+
var L = langOf(lang);
|
|
5576
|
+
var start = turnStart(msg, t);
|
|
5577
|
+
var act = chatActivityOf(msg);
|
|
5578
|
+
if (!act || act.step === "thinking") return pick(T[L].thinking, t - start, 1);
|
|
5579
|
+
var elapsed = t - act.since;
|
|
5580
|
+
if (act.step === "writing") return pick(T[L].writing, elapsed);
|
|
5581
|
+
if (act.step === "between") return pick(T[L].between, elapsed);
|
|
5582
|
+
return pick(toolLines(act.tool || "", act.input, L), elapsed);
|
|
5583
|
+
}
|
|
5584
|
+
|
|
5265
5585
|
// src/engine/history.ts
|
|
5266
5586
|
function filterListByClearHorizon(list, clearedAt) {
|
|
5267
5587
|
if (!clearedAt) return list;
|
|
@@ -5946,7 +6266,7 @@ function createScrollAnchor(options) {
|
|
|
5946
6266
|
restore(anchor);
|
|
5947
6267
|
return result;
|
|
5948
6268
|
}
|
|
5949
|
-
function
|
|
6269
|
+
function remember2() {
|
|
5950
6270
|
held = capture();
|
|
5951
6271
|
}
|
|
5952
6272
|
function hold() {
|
|
@@ -5992,7 +6312,7 @@ function createScrollAnchor(options) {
|
|
|
5992
6312
|
capture,
|
|
5993
6313
|
restore,
|
|
5994
6314
|
preserve,
|
|
5995
|
-
remember,
|
|
6315
|
+
remember: remember2,
|
|
5996
6316
|
hold,
|
|
5997
6317
|
pinBottom,
|
|
5998
6318
|
absorb,
|
|
@@ -7270,6 +7590,7 @@ var _ChatSession = class _ChatSession {
|
|
|
7270
7590
|
_paintLiveStream(st) {
|
|
7271
7591
|
if (st.ended) return;
|
|
7272
7592
|
st.lastPaintAt = nowMs();
|
|
7593
|
+
noteChatActivity(st.id, st.parser.snapshot());
|
|
7273
7594
|
if (this.getHistoryCacheKey() !== st.ownerKey) return;
|
|
7274
7595
|
var idx = this._liveTargetIndex(st.id);
|
|
7275
7596
|
if (idx === -1) {
|
|
@@ -12127,7 +12448,7 @@ var _ChatSession = class _ChatSession {
|
|
|
12127
12448
|
* or waiting is left to the live queue check, which shows it as it settles; one already
|
|
12128
12449
|
* in the chat is not read again. Never throws.
|
|
12129
12450
|
*/
|
|
12130
|
-
loadRunPasses(storagePath,
|
|
12451
|
+
loadRunPasses(storagePath, fileName2) {
|
|
12131
12452
|
var self = this;
|
|
12132
12453
|
var cfg = chatEngineConfig();
|
|
12133
12454
|
var list = cfg.listIndexPasses, lookup = cfg.csrHistoryItemLookup;
|
|
@@ -12146,7 +12467,7 @@ var _ChatSession = class _ChatSession {
|
|
|
12146
12467
|
p.error = void 0;
|
|
12147
12468
|
this.host.notify();
|
|
12148
12469
|
var svcId = id.projectId, owner = id.owner;
|
|
12149
|
-
var name =
|
|
12470
|
+
var name = fileName2 || storagePath.split("/").pop() || storagePath;
|
|
12150
12471
|
var idsReady = p.ids.length ? Promise.resolve(p.ids) : Promise.resolve(list(svcId, storagePath)).then(function(ids) {
|
|
12151
12472
|
var clean = (Array.isArray(ids) ? ids : []).filter(function(x) {
|
|
12152
12473
|
return typeof x === "string" && !!x;
|
|
@@ -12308,14 +12629,14 @@ var _ChatSession = class _ChatSession {
|
|
|
12308
12629
|
});
|
|
12309
12630
|
}
|
|
12310
12631
|
/** The page progress to show for a file's row, or null (see _refreshPageProgress). */
|
|
12311
|
-
pageProgressFor(storagePath,
|
|
12632
|
+
pageProgressFor(storagePath, fileName2) {
|
|
12312
12633
|
var map = this.state.indexPageProgress;
|
|
12313
12634
|
if (!map) return null;
|
|
12314
12635
|
var p = storagePath ? map[storagePath] : void 0;
|
|
12315
|
-
if (!p &&
|
|
12636
|
+
if (!p && fileName2) {
|
|
12316
12637
|
var hit = null;
|
|
12317
12638
|
for (var k in map) {
|
|
12318
|
-
if (k ===
|
|
12639
|
+
if (k === fileName2 || k.slice(-(fileName2.length + 1)) === "/" + fileName2) {
|
|
12319
12640
|
if (hit) {
|
|
12320
12641
|
hit = null;
|
|
12321
12642
|
break;
|
|
@@ -13936,6 +14257,6 @@ var _ChatSession = class _ChatSession {
|
|
|
13936
14257
|
_ChatSession.RUN_PASS_PAGE = 10;
|
|
13937
14258
|
var ChatSession = _ChatSession;
|
|
13938
14259
|
|
|
13939
|
-
export { ANSWER_MODES, ANSWER_MODE_HINTS, ANSWER_MODE_LABELS, ANSWER_MODE_OPTIONS, ANSWER_MODE_SETTING_LABEL, BG_INDEXING_QUEUE_SUFFIX, BOM, BOM_EXTS, CHAT_GREETING_MAX_LENGTH, CLAUDE_INPUT_CAP_RATIO, CLAUDE_PER_REQUEST_INPUT_CAP, CONTENT_CLAIM_PREFIX, CONTEXT_WINDOW_BY_MODEL, CONTEXT_WINDOW_DEFAULT, ChatSession, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SHARE_IDENTICAL_FILES, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_LIMIT, DUPLICATE_LOOKUP_MAX_CANDIDATES, DUPLICATE_LOOKUP_TIMEOUT_MS, EMPTY_INDEXING_REPLY, EXPIRED_ATTACHMENT_URL_HOST, EXPIRED_ATTACHMENT_URL_ORIGIN, EXPIRED_LINK_REFRESH_EXPIRES_SECONDS, EXT_CONTENT_TYPES, HISTORY_BUDGET_RATIO, HISTORY_FILL_SLACK_PX, HISTORY_TOKEN_BUDGET, HTML_EXTS, HTML_HEAD_WINDOW, IMAGE_PREVIEWS_PER_MESSAGE, INDEXING_COMPLETE_MARKER, INDEXING_MAX_OUTPUT_TOKENS, INLINE_LINK_GLYPH, INLINE_LINK_UNAVAILABLE_GLYPH, INLINE_LINK_UNAVAILABLE_SUFFIX, INPUT_CAP_RATIO, LINKED_COPY_TAG, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, LOOK_DEADLINE_MS, LOOK_FAST_MS, LOOK_SLOW_MS, LOOK_STALE_MS, LookScheduler, MAX_CONCURRENT_BG_POLLS, MAX_HISTORY_FILL_PAGES, MAX_HISTORY_MESSAGES, MAX_OUTPUT_BY_MODEL, MAX_OUTPUT_TOKENS, MAX_PARSED_CONTENT_CHARS, MCP_NAME, MINT_CACHE_GENERATION, MIN_INPUT_TOKEN_BUDGET, MIN_PER_REQUEST_INPUT_CAP, NOT_SENT_TEXT, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, PAGE_TEXT_TABLE, POLL_INTERVAL, PRESIGN_SAFETY_MARGIN_MS, PREVIEWABLE_IMAGE_CONTENT_TYPES, PREVIEW_BROWSER_CACHE_SECONDS, PREVIEW_LAYOUT_BOX_SELECTOR, PREVIEW_URL_EXPIRES_SECONDS, PROJECT_SETTINGS_ACCESS_GROUP, PROJECT_SETTINGS_TABLE, PROJECT_SETTINGS_UNIQUE_ID, RENDER_FROM_TOKEN, REQUEST_GONE_TEXT, REQUEST_UNREACHABLE_TEXT, RETRIEVAL_NOTES_MAX, RETRIEVAL_NOTES_TOKEN_BUDGET, RETRIEVAL_NOTE_MAX_CHARS, RETRIEVAL_NOTE_MAX_ITEMS, RETRIEVAL_NOTE_PREFIX, RTF_EXTS, RUN_RECORD_WORKING_STALE_MS, SHARE_IDENTICAL_FILES_KEY, STREAM_POLL_INTERVAL, TOOL_AND_RESPONSE_BUFFER, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, UPLOAD_CANCELLED_MESSAGE, XML_EXTS, __resetSplitHistoryState, accessSettingFrom, adoptLiveTextIntoRunningRow, adoptLocalAnswerIntoPage, answerModeFrom, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatCacheKey, chatEffortFields, chatEngineConfig, chatGreetingFrom, chatStreamWiring, citationFileName, citationLinkPart, citationsFor, classifyInlineLink, clearAttachmentParsers, clearImagePreviewCache, clearProjectSettings, composeUserMessage, configureChatEngine, configureProjectSettings, contentTypeForExt, copiesByOriginal, copiesToPromote, copyCountLabel, copyCountTitle, copyStatusOf, createHistoryFiller, createInlineLinkRegex, createScrollAnchor, createSseParser, crefSupported, csrEnvelopeError, encodePathSegments, encodingClassForExt, ensureHtmlCharset, ensureXmlEncoding, escapeInlineHtml, escapeRtfNonAscii, estimateMessageTokens, estimateTextTokens, extOf, extractClaudeText, extractLastUserTextFromRequest, extractOpenAIText, extractRemotePathFromAttachmentHref, extractRetrievalNote, fetchLiveIndexingKeys, fileNameOf, fillHistoryViewport, filterListByClearHorizon, findAttachmentParser, findDuplicateUpload, findIdenticalFiles, formatChatTimestamp, formatDuration, formatIndexDuration, formatLinkDuration, formatRetrievalNote, getAttachmentParsers, getChatHistory, getContextWindow, getErrorMessage, getExpiredAttachmentVisiblePath, getInputTokenBudget, getMaxOutputTokens, getModelContextWindow, getProjectContextWindow, getSplitChatHistory, getVisionProfile, groupAttachmentFailures, hasBom, hydrateImagePreviews, identicalLinkReasonText, indexDoneUniqueId, indexGroupDurationLabel, indexGroupLinkedLabel, indexScopeKey, indexingAccessGroup, isAuthExpiredError, isBgIndexingQueue, isCsrStatusEnvelope, isDataToolName, isDuplicateCandidateId, isErrorResponseBody, isHttpUrlLike, isImageVisionFile, isIndexingRequestText, isLinkUnavailable, isNonRetryableRequestError, isNotExistsError, isOfficeFile, isPagedReadFile, isPreviewableImagePath, isProviderApiKeyError, isRetriedFailure, isRetrievalNote, isReturnTrigger, isServerExtractable, isServiceDbAttachmentHref, isTransportFailure, isUploadCancelledError, isWindowedReadFile, linkIdenticalFile, linkUnavailableKeyForHref, linkUnavailableKeyForPath, linkUnavailableKeysForPath, linkedMarkerOf, linkedRowLabel, listClaudeModels, listContentClaims, listLinkedCopies, listOpenAIModels, listedRequestText, liveSafePrefix, loadProjectSettings, looksLikeRtf, makeExtractPlaceholder, mapHistoryListToMessages, markImagePreviewStale, mayKeepStreamedAnswer, messageTimeMs, mintCacheBustStamp, needsBomForExt, newClientRef, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeShareIdenticalFiles, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, parseLinkedReply, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectShareIdenticalFiles, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, promotableCopies, providerBodyWasRead, providerDocument, readExpiredAttachmentHref, readyProjectSettings, reconcilerReadsEnabled, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, requestIdTimeMs, resetFileIndexOnServer, resolveAnswerMode, resolveImagePreviewUrl, resolveSkipDuplicateFiles, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, runRecordDurationMs, runSettleSideEffect, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, shareIdenticalFilesFrom, shouldRescueInFlightMessage, sideEffectDone, skapiSupportsStreaming, skipDuplicateFilesEnabled, skipDuplicateFilesFrom, splitLabelForFit, statusPushEnabled, statusPushLive, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
|
|
14260
|
+
export { ANSWER_MODES, ANSWER_MODE_HINTS, ANSWER_MODE_LABELS, ANSWER_MODE_OPTIONS, ANSWER_MODE_SETTING_LABEL, BG_INDEXING_QUEUE_SUFFIX, BOM, BOM_EXTS, CHAT_ACTIVITY_ROTATE_MS, CHAT_GREETING_MAX_LENGTH, CLAUDE_INPUT_CAP_RATIO, CLAUDE_PER_REQUEST_INPUT_CAP, CONTENT_CLAIM_PREFIX, CONTEXT_WINDOW_BY_MODEL, CONTEXT_WINDOW_DEFAULT, ChatSession, DATA_TOOL_NAMES, DEFAULT_ANSWER_MODE, DEFAULT_CLAUDE_MODEL, DEFAULT_CONTEXT_WINDOW, DEFAULT_OPENAI_MODEL, DEFAULT_SHARE_IDENTICAL_FILES, DEFAULT_SKIP_DUPLICATE_FILES, DEFAULT_UPLOAD_ACCESS_GROUP, DEFAULT_WEB_ACCESS, DUPLICATE_LOOKUP_LIMIT, DUPLICATE_LOOKUP_MAX_CANDIDATES, DUPLICATE_LOOKUP_TIMEOUT_MS, EMPTY_INDEXING_REPLY, EXPIRED_ATTACHMENT_URL_HOST, EXPIRED_ATTACHMENT_URL_ORIGIN, EXPIRED_LINK_REFRESH_EXPIRES_SECONDS, EXT_CONTENT_TYPES, FILE_GROUP_HEADER, HISTORY_BUDGET_RATIO, HISTORY_FILL_SLACK_PX, HISTORY_TOKEN_BUDGET, HTML_EXTS, HTML_HEAD_WINDOW, IMAGE_PREVIEWS_PER_MESSAGE, INDEXING_COMPLETE_MARKER, INDEXING_MAX_OUTPUT_TOKENS, INLINE_LINK_GLYPH, INLINE_LINK_UNAVAILABLE_GLYPH, INLINE_LINK_UNAVAILABLE_SUFFIX, INPUT_CAP_RATIO, LINKED_COPY_TAG, LINK_LABEL_MAX_DISPLAY_CHARS, LINK_REFRESH_WINDOW_MS, LOOK_DEADLINE_MS, LOOK_FAST_MS, LOOK_SLOW_MS, LOOK_STALE_MS, LookScheduler, MAX_CONCURRENT_BG_POLLS, MAX_HISTORY_FILL_PAGES, MAX_HISTORY_MESSAGES, MAX_OUTPUT_BY_MODEL, MAX_OUTPUT_TOKENS, MAX_PARSED_CONTENT_CHARS, MCP_NAME, MINT_CACHE_GENERATION, MIN_INPUT_TOKEN_BUDGET, MIN_PER_REQUEST_INPUT_CAP, NOT_SENT_TEXT, NO_DATA_TOOL_MARK, OUTPUT_TOKEN_RESERVE, PAGE_TEXT_TABLE, POLL_INTERVAL, PRESIGN_SAFETY_MARGIN_MS, PREVIEWABLE_IMAGE_CONTENT_TYPES, PREVIEW_BROWSER_CACHE_SECONDS, PREVIEW_LAYOUT_BOX_SELECTOR, PREVIEW_URL_EXPIRES_SECONDS, PROJECT_SETTINGS_ACCESS_GROUP, PROJECT_SETTINGS_TABLE, PROJECT_SETTINGS_UNIQUE_ID, RENDER_FROM_TOKEN, REQUEST_GONE_TEXT, REQUEST_UNREACHABLE_TEXT, RETRIEVAL_NOTES_MAX, RETRIEVAL_NOTES_TOKEN_BUDGET, RETRIEVAL_NOTE_MAX_CHARS, RETRIEVAL_NOTE_MAX_ITEMS, RETRIEVAL_NOTE_PREFIX, RTF_EXTS, RUN_RECORD_WORKING_STALE_MS, SHARE_IDENTICAL_FILES_KEY, STREAM_POLL_INTERVAL, TOOL_AND_RESPONSE_BUFFER, UPLOAD_ACCESS_GROUPS, UPLOAD_ACCESS_HINTS, UPLOAD_ACCESS_LABELS, UPLOAD_ACCESS_OPTIONS, UPLOAD_CANCELLED_MESSAGE, XML_EXTS, __resetSplitHistoryState, accessSettingFrom, adoptLiveTextIntoRunningRow, adoptLocalAnswerIntoPage, answerModeFrom, answerUsedNoDataTool, applyEncodingDeclaration, applyRetrievalNotes, asksUploadAccessFrom, bgIndexingQueueName, buildAiAgentValue, buildBoundedChatMessages, buildChatDisplayList, buildChatGreeting, buildChatSystemPrompt, buildDisplayExpiredAttachmentHref, buildHistoryItemFullId, buildIndexingContinueMessage, buildIndexingRenderContinueTemplate, buildIndexingRenderMessage, buildIndexingSystemPrompt, buildIndexingUserMessage, buildIndexingWindowMessage, cachedProjectSettings, callClaudeWithMcp, callClaudeWithPublicMcp, callOpenAIWithPublicMcp, canonicalizePathForm, chatActivityLine, chatActivityOf, chatCacheKey, chatEffortFields, chatEngineConfig, chatGreetingFrom, chatStreamWiring, citationFileName, citationLinkPart, citationsFor, classifyInlineLink, clearAttachmentParsers, clearImagePreviewCache, clearProjectSettings, composeUserMessage, configureChatEngine, configureProjectSettings, contentTypeForExt, copiesByOriginal, copiesToPromote, copyCountLabel, copyCountTitle, copyStatusOf, createHistoryFiller, createInlineLinkRegex, createScrollAnchor, createSseParser, crefSupported, csrEnvelopeError, encodePathSegments, encodingClassForExt, ensureHtmlCharset, ensureXmlEncoding, escapeInlineHtml, escapeRtfNonAscii, estimateMessageTokens, estimateTextTokens, extOf, extractClaudeText, extractLastUserTextFromRequest, extractOpenAIText, extractRemotePathFromAttachmentHref, extractRetrievalNote, fetchLiveIndexingKeys, fileGroupHeader, fileNameOf, fillHistoryViewport, filterListByClearHorizon, findAttachmentParser, findDuplicateUpload, findIdenticalFiles, formatChatTimestamp, formatDuration, formatIndexDuration, formatLinkDuration, formatRetrievalNote, getAttachmentParsers, getChatHistory, getContextWindow, getErrorMessage, getExpiredAttachmentVisiblePath, getInputTokenBudget, getMaxOutputTokens, getModelContextWindow, getProjectContextWindow, getSplitChatHistory, getVisionProfile, groupAttachmentFailures, hasBom, hydrateImagePreviews, identicalLinkReasonText, indexDoneUniqueId, indexGroupDurationLabel, indexGroupLinkedLabel, indexScopeKey, indexingAccessGroup, isAuthExpiredError, isBgIndexingQueue, isCsrStatusEnvelope, isDataToolName, isDuplicateCandidateId, isErrorResponseBody, isHttpUrlLike, isImageVisionFile, isIndexingRequestText, isLinkUnavailable, isNonRetryableRequestError, isNotExistsError, isOfficeFile, isPagedReadFile, isPreviewableImagePath, isProviderApiKeyError, isRetriedFailure, isRetrievalNote, isReturnTrigger, isServerExtractable, isServiceDbAttachmentHref, isTransportFailure, isUploadCancelledError, isWindowedReadFile, linkIdenticalFile, linkUnavailableKeyForHref, linkUnavailableKeyForPath, linkUnavailableKeysForPath, linkedMarkerOf, linkedRowLabel, listClaudeModels, listContentClaims, listLinkedCopies, listOpenAIModels, listedRequestText, liveSafePrefix, loadProjectSettings, looksLikeRtf, makeExtractPlaceholder, mapHistoryListToMessages, markImagePreviewStale, mayKeepStreamedAnswer, messageTimeMs, mintCacheBustStamp, needsBomForExt, newClientRef, normalizeAnswerMode, normalizeAttachmentPathCandidate, normalizeChatGreeting, normalizeExt, normalizeProjectAccessSetting, normalizeShareIdenticalFiles, normalizeSkipDuplicateFiles, normalizeStoredPathTarget, normalizeTextContent, normalizeTrailingInlineToken, normalizeUploadAccessGroup, normalizeWebAccess, noteChatActivity, notifyAgentSaveAttachment, parseAiAgentValue, parseAttachmentContent, parseIndexingLabel, parseIndexingRequestText, parseLinkedReply, patchProjectSettings, peekImagePreviewUrl, prepareDownloadText, presignExpiryEpochMs, previewImageContentType, previewLayoutBox, previewMintCacheToken, previewableExtOf, primeProjectSettings, projectAccessSetting, projectAnswerMode, projectAsksUploadAccess, projectChatGreeting, projectSettingsSettled, projectShareIdenticalFiles, projectSkipDuplicateFiles, projectUploadAccessGroup, projectWebAccess, promotableCopies, providerBodyWasRead, providerDocument, readExpiredAttachmentHref, readyProjectSettings, reconcilerReadsEnabled, registerAttachmentParser, registerModelContextWindows, renderInlineLinkHtml, repairUrlEntities, repairUrlWhitespace, requestIdTimeMs, resetFileIndexOnServer, resolveAnswerMode, resolveImagePreviewUrl, resolveSkipDuplicateFiles, resolveWebAccess, retrievalNoteFromText, retrievalNoteOfAnswer, runIndexUniqueId, runRecordDurationMs, runSettleSideEffect, safeDecodeURIComponent, sanitizeAttachmentLinksForHistory, setProjectContextWindow, setProjectSettings, sha1Hex, shareIdenticalFilesFrom, shouldRescueInFlightMessage, sideEffectDone, skapiSupportsStreaming, skipDuplicateFilesEnabled, skipDuplicateFilesFrom, splitLabelForFit, statusPushEnabled, statusPushLive, streamRecoveryEnabled, streamRecoveryLabels, streamRecoveryPhase, stripFileBlocksFromHistory, transformContentWithImages, transformContentWithOpenAIImages, truncateLabelForDisplay, typewriterResumeIndex, uploadAccessGroupFrom, upsertIndexRunRecordSafe, wallClockNow, webAccessEnabled, webAccessFrom };
|
|
13940
14261
|
//# sourceMappingURL=engine.mjs.map
|
|
13941
14262
|
//# sourceMappingURL=engine.mjs.map
|