@burdenoff/fe-libs 2026.930.5 → 2026.1001.2
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/connections/api.d.ts.map +1 -1
- package/dist/connections/api.js +4 -3
- package/dist/connections/oauthPopup.d.ts.map +1 -1
- package/dist/connections/oauthPopup.js +8 -9
- package/dist/shared/assistant/conversation.d.ts +5 -1
- package/dist/shared/assistant/conversation.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyApi.d.ts +25 -9
- package/dist/shared/assistant/history/historyApi.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyApi.js +220 -75
- package/dist/shared/assistant/history/historyControls.d.ts +86 -0
- package/dist/shared/assistant/history/historyControls.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyControls.js +80 -0
- package/dist/shared/assistant/history/historyEngine.d.ts +23 -3
- package/dist/shared/assistant/history/historyEngine.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyEngine.js +578 -369
- package/dist/shared/assistant/history/historyErrors.d.ts +25 -5
- package/dist/shared/assistant/history/historyErrors.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyErrors.js +39 -30
- package/dist/shared/assistant/history/historyList.d.ts +33 -7
- package/dist/shared/assistant/history/historyList.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyList.js +72 -51
- package/dist/shared/assistant/history/historyOperations.d.ts +36 -7
- package/dist/shared/assistant/history/historyOperations.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyOperations.js +100 -25
- package/dist/shared/assistant/history/historyStatus.d.ts +27 -1
- package/dist/shared/assistant/history/historyStatus.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyStatus.js +6 -2
- package/dist/shared/assistant/history/historyStore.d.ts +29 -7
- package/dist/shared/assistant/history/historyStore.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyStore.js +172 -103
- package/dist/shared/assistant/history/historyTransportErrors.d.ts +28 -0
- package/dist/shared/assistant/history/historyTransportErrors.d.ts.map +1 -0
- package/dist/shared/assistant/history/historyTransportErrors.js +16 -0
- package/dist/shared/assistant/history/historyTypes.d.ts +80 -1
- package/dist/shared/assistant/history/historyTypes.d.ts.map +1 -1
- package/dist/shared/assistant/history/stampRegistry.d.ts +19 -1
- package/dist/shared/assistant/history/stampRegistry.d.ts.map +1 -1
- package/dist/shared/assistant/history/stampRegistry.js +13 -1
- package/dist/shared/assistant/index.d.ts +2 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/store.d.ts +8 -0
- package/dist/shared/assistant/store.d.ts.map +1 -1
- package/dist/shared/assistant/store.js +50 -46
- package/dist/shared-assistant.js +164 -162
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"historyControls.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyControls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,KAAK,EACV,uBAAuB,EACvB,uBAAuB,EACvB,kCAAkC,EAClC,sBAAsB,EACtB,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB;;;;;GAKG;AACH,eAAO,MAAM,UAAU,KAAK,CAAC;AAE7B,yEAAyE;AACzE,eAAO,MAAM,6BAA6B,KAAK,CAAC;AAOhD,kFAAkF;AAClF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnE;AAED,yCAAyC;AACzC,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAO1D;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,2BAA2B,EAClC,KAAK,EAAE,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EAAE,UAAU,GAAG,YAAY,GAAG,SAAS,CAAC,EAC7E,MAAM,GAAE,QAAQ,CAAC,kCAAkC,CAA+B,GACjF,OAAO,CAWT;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,QAAQ,CAAC,kCAAkC,CAAC,GAAG,SAAS,GAAG,MAAM,CAIzG"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
//#region src/shared/assistant/history/historyControls.ts
|
|
2
|
+
var e = 50, t = 80, n = /[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?<![\uD800-\uDBFF])[\uDC00-\uDFFF]/g, r = "\0", i = "�";
|
|
3
|
+
function a(e, t) {
|
|
4
|
+
let n = Array.from(e);
|
|
5
|
+
return n.length <= t ? e : n.slice(0, t).join("");
|
|
6
|
+
}
|
|
7
|
+
function o(e) {
|
|
8
|
+
return Array.from(e).length;
|
|
9
|
+
}
|
|
10
|
+
function s(e) {
|
|
11
|
+
return a(e.replaceAll(r, i).replace(n, i).replace(/\s+/g, " ").trim(), 80).trim();
|
|
12
|
+
}
|
|
13
|
+
function c(e, t) {
|
|
14
|
+
let n = {
|
|
15
|
+
...e,
|
|
16
|
+
...t
|
|
17
|
+
};
|
|
18
|
+
return t.archived === !0 && t.pinned === void 0 && delete n.pinned, t.pinned === !0 && t.archived === void 0 && delete n.archived, n;
|
|
19
|
+
}
|
|
20
|
+
function l(e) {
|
|
21
|
+
return !([
|
|
22
|
+
e.title,
|
|
23
|
+
e.pinned,
|
|
24
|
+
e.archived
|
|
25
|
+
].filter((e) => e !== void 0).length === 0 || e.pinned === !0 && e.archived === !0 || e.title !== void 0 && (e.title.length === 0 || e.title !== s(e.title)));
|
|
26
|
+
}
|
|
27
|
+
function u(e) {
|
|
28
|
+
let t = !1, n = !1;
|
|
29
|
+
for (let r of e.messages) if (r.role === "user" && (r.metadata?.voice === !0 ? n = !0 : t = !0, t && n)) return "MIXED";
|
|
30
|
+
return n ? "VOICE" : t ? "CHAT" : null;
|
|
31
|
+
}
|
|
32
|
+
function d(e) {
|
|
33
|
+
return {
|
|
34
|
+
typed: e === "CHAT" || e === "MIXED",
|
|
35
|
+
spoken: e === "VOICE" || e === "MIXED"
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
function f(e, t) {
|
|
39
|
+
let n = {};
|
|
40
|
+
if (t === null) return n;
|
|
41
|
+
for (let r of e) r.type !== "update" || r.scopeKey !== t || (n[r.convKey] ??= []).push({
|
|
42
|
+
patch: r.patch,
|
|
43
|
+
at: r.at
|
|
44
|
+
});
|
|
45
|
+
return n;
|
|
46
|
+
}
|
|
47
|
+
function p(e, t, n = []) {
|
|
48
|
+
let r = t?.pinnedAt ?? null, i = t?.archivedAt ?? null, a = null;
|
|
49
|
+
for (let { patch: e, at: t } of n) {
|
|
50
|
+
let n = new Date(t).toISOString();
|
|
51
|
+
e.title !== void 0 && (a = e.title), e.archived === !0 ? (i ??= n, r = null) : e.archived === !1 && (i = null), e.pinned === !0 ? (r ??= n, i = null) : e.pinned === !1 && (r = null);
|
|
52
|
+
}
|
|
53
|
+
let o = d(t?.channel), s = d(e ? u(e) : null), c = o.typed || s.typed, l = o.spoken || s.spoken;
|
|
54
|
+
return {
|
|
55
|
+
pendingTitle: a,
|
|
56
|
+
pinnedAt: r,
|
|
57
|
+
archivedAt: i,
|
|
58
|
+
channel: c && l ? "MIXED" : l ? "VOICE" : c ? "CHAT" : null,
|
|
59
|
+
known: t !== null && t.pinnedAt !== void 0 || n.length > 0,
|
|
60
|
+
pending: n.length > 0
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
var m = {
|
|
64
|
+
channel: "ANY",
|
|
65
|
+
pinned: null,
|
|
66
|
+
archived: "EXCLUDE"
|
|
67
|
+
};
|
|
68
|
+
function h(e, t = m) {
|
|
69
|
+
let n = t.archived ?? "EXCLUDE";
|
|
70
|
+
if (n === "EXCLUDE" && e.archivedAt !== null || n === "ONLY" && e.archivedAt === null || t.pinned === !0 && e.pinnedAt === null || t.pinned === !1 && e.pinnedAt !== null) return !1;
|
|
71
|
+
let r = d(e.channel), i = t.channel ?? "ANY";
|
|
72
|
+
return !(i === "CHAT" && !r.typed || i === "VOICE" && !r.spoken);
|
|
73
|
+
}
|
|
74
|
+
function g(e) {
|
|
75
|
+
if (!e) return "";
|
|
76
|
+
let t = e.pinned === !0 ? "pinned" : e.pinned === !1 ? "unpinned" : "any";
|
|
77
|
+
return `${e.channel ?? "ANY"}|${t}|${e.archived ?? "EXCLUDE"}`;
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { m as DEFAULT_HISTORY_LIST_FILTER, t as HISTORY_TITLE_MAX_CODE_POINTS, e as MAX_PINNED, a as clampToCodePoints, c as coalesceUpdatePatch, o as codePointLength, g as historyFilterKey, l as isValidUpdatePatch, u as localChannelOf, h as matchesHistoryFilter, s as normaliseHistoryTitle, f as pendingUpdatesByConversation, p as resolveRowControls };
|
|
@@ -3,7 +3,7 @@ import { useAssistantStore } from '../store';
|
|
|
3
3
|
import { AssistantHistoryTransport } from './historyApi';
|
|
4
4
|
import { AssistantHistoryStatusStore } from './historyStatus';
|
|
5
5
|
import { AssistantHistoryStoreHandle } from './historyStore';
|
|
6
|
-
import { AssistantHistoryConvKey, AssistantHistoryEntryKind, AssistantHistoryScope } from './historyTypes';
|
|
6
|
+
import { AssistantHistoryConvKey, AssistantHistoryConversationFilter, AssistantHistoryEntryKind, AssistantHistoryScope, AssistantHistoryUpdatePatch } from './historyTypes';
|
|
7
7
|
/** Time, injectable so the engine's backoff and pruning are testable without real timers. */
|
|
8
8
|
export interface AssistantHistoryClock {
|
|
9
9
|
now(): number;
|
|
@@ -59,11 +59,31 @@ export interface AssistantHistoryEngine {
|
|
|
59
59
|
recordCommittedEntries(conversationId: string, messageIds: readonly string[], kind: AssistantHistoryEntryKind, turnWorkspaceId: string): void;
|
|
60
60
|
/** The UI's delete while history is on: tombstone, drop unsent saves, queue the delete, remove locally. */
|
|
61
61
|
deleteConversation(convKey: AssistantHistoryConvKey): void;
|
|
62
|
+
/**
|
|
63
|
+
* A control change (BOFF-8159) — rename, pin, archive — for a conversation
|
|
64
|
+
* the server can address: shown at once (the list reads the queue first; a
|
|
65
|
+
* held conversation's title changes here too) and queued for the server.
|
|
66
|
+
* False, and nothing changes, when it cannot be synced: history off, a
|
|
67
|
+
* device-only conversation, another workspace's, a deleted one, one the
|
|
68
|
+
* server cannot know yet (nothing saved or queued to save), or a patch the
|
|
69
|
+
* server would refuse (empty; pin and archive together; an empty title).
|
|
70
|
+
*/
|
|
71
|
+
updateConversation(convKey: AssistantHistoryConvKey, patch: AssistantHistoryUpdatePatch): boolean;
|
|
62
72
|
/** Materialise a server conversation locally (if needed), open it, and load its messages. */
|
|
63
73
|
openConversation(convKey: AssistantHistoryConvKey, options?: AssistantHistoryOpenOptions): void;
|
|
64
74
|
loadEarlier(convKey: AssistantHistoryConvKey): void;
|
|
65
|
-
|
|
66
|
-
|
|
75
|
+
/**
|
|
76
|
+
* "Show older conversations": page the server's live list past the cached
|
|
77
|
+
* headers — with `filter` (the list's current one) when the server has the
|
|
78
|
+
* controls, unfiltered otherwise.
|
|
79
|
+
*/
|
|
80
|
+
loadOlderHeaders(filter?: AssistantHistoryConversationFilter): void;
|
|
81
|
+
/**
|
|
82
|
+
* The history list was opened: retry quota-parked saves now, try the
|
|
83
|
+
* controls again if the server lacked them, pull, and fetch the pinned
|
|
84
|
+
* conversations (so the pinned rows are right even when this device's
|
|
85
|
+
* headers were evicted by another build's tab).
|
|
86
|
+
*/
|
|
67
87
|
notePanelOpened(): void;
|
|
68
88
|
pull(reason: string): void;
|
|
69
89
|
drain(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"historyEngine.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyEngine.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"historyEngine.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyEngine.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