@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
|
@@ -1,20 +1,35 @@
|
|
|
1
1
|
//#region src/shared/assistant/history/historyOperations.ts
|
|
2
|
-
var e = "\n id\n clientConversationId\n productId\n title\n legacy\n revision\n lastMessageSeq\n deleted\n deletedAt\n createdAt\n updatedAt\n", t =
|
|
2
|
+
var e = "\n id\n clientConversationId\n productId\n title\n legacy\n revision\n lastMessageSeq\n deleted\n deletedAt\n createdAt\n updatedAt\n", t = `${e} pinnedAt
|
|
3
|
+
archivedAt
|
|
4
|
+
channel
|
|
5
|
+
`, n = "\n id\n clientMessageId\n kind\n role\n content\n seq\n createdAt\n clientCreatedAt\n metadata\n", r = "\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n", i = "AssistantHistoryChanges", a = (e) => `
|
|
3
6
|
query AssistantHistoryChanges($productId: String!, $first: Int, $after: String) {
|
|
4
7
|
myAssistantHistoryChanges(productId: $productId, first: $first, after: $after) {
|
|
5
8
|
nodes {${e}}
|
|
6
|
-
pageInfo {${
|
|
9
|
+
pageInfo {${r}}
|
|
7
10
|
resetRequired
|
|
8
11
|
}
|
|
9
12
|
}
|
|
10
|
-
`, a = "AssistantHistoryConversations",
|
|
13
|
+
`, o = a(t), s = a(e), c = "AssistantHistoryConversations", l = `
|
|
14
|
+
query AssistantHistoryConversations(
|
|
15
|
+
$productId: String!
|
|
16
|
+
$first: Int
|
|
17
|
+
$after: String
|
|
18
|
+
$filter: AssistantHistoryConversationFilter
|
|
19
|
+
) {
|
|
20
|
+
myAssistantConversations(productId: $productId, first: $first, after: $after, filter: $filter) {
|
|
21
|
+
nodes {${t}}
|
|
22
|
+
pageInfo {${r}}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
`, u = `
|
|
11
26
|
query AssistantHistoryConversations($productId: String!, $first: Int, $after: String) {
|
|
12
27
|
myAssistantConversations(productId: $productId, first: $first, after: $after) {
|
|
13
28
|
nodes {${e}}
|
|
14
|
-
pageInfo {${
|
|
29
|
+
pageInfo {${r}}
|
|
15
30
|
}
|
|
16
31
|
}
|
|
17
|
-
`,
|
|
32
|
+
`, d = "AssistantHistoryEntries", f = (e) => `
|
|
18
33
|
query AssistantHistoryEntries(
|
|
19
34
|
$productId: String!
|
|
20
35
|
$clientConversationId: ID
|
|
@@ -36,20 +51,20 @@ var e = "\n id\n clientConversationId\n productId\n title\n legacy\n revis
|
|
|
36
51
|
before: $before
|
|
37
52
|
) {
|
|
38
53
|
conversation {${e}}
|
|
39
|
-
nodes {${
|
|
40
|
-
pageInfo {${
|
|
54
|
+
nodes {${n}}
|
|
55
|
+
pageInfo {${r}}
|
|
41
56
|
}
|
|
42
57
|
}
|
|
43
|
-
`,
|
|
58
|
+
`, p = f(t), m = f(e), h = "SaveAssistantHistoryEntries", g = (e) => `
|
|
44
59
|
mutation SaveAssistantHistoryEntries($input: SaveMyAssistantHistoryEntriesInput!) {
|
|
45
60
|
saveMyAssistantHistoryEntries(input: $input) {
|
|
46
61
|
outcome
|
|
47
62
|
conversation {${e}}
|
|
48
|
-
entries {${
|
|
63
|
+
entries {${n}}
|
|
49
64
|
droppedMetadataKeys
|
|
50
65
|
}
|
|
51
66
|
}
|
|
52
|
-
`,
|
|
67
|
+
`, _ = g(t), v = g(e), y = "DeleteAssistantHistoryConversation", b = (e) => `
|
|
53
68
|
mutation DeleteAssistantHistoryConversation(
|
|
54
69
|
$productId: String!
|
|
55
70
|
$clientConversationId: ID
|
|
@@ -64,36 +79,87 @@ var e = "\n id\n clientConversationId\n productId\n title\n legacy\n revis
|
|
|
64
79
|
conversation {${e}}
|
|
65
80
|
}
|
|
66
81
|
}
|
|
67
|
-
`,
|
|
82
|
+
`, x = b(t), S = b(e), C = "UpdateAssistantHistoryConversation", w = `
|
|
83
|
+
mutation UpdateAssistantHistoryConversation($input: UpdateMyAssistantConversationInput!) {
|
|
84
|
+
updateMyAssistantConversation(input: $input) {
|
|
85
|
+
outcome
|
|
86
|
+
conversation {${t}}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
`, T = [
|
|
90
|
+
{
|
|
91
|
+
operationName: i,
|
|
92
|
+
document: o,
|
|
93
|
+
set: "full"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
operationName: c,
|
|
97
|
+
document: l,
|
|
98
|
+
set: "full"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
operationName: d,
|
|
102
|
+
document: p,
|
|
103
|
+
set: "full"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
operationName: h,
|
|
107
|
+
document: _,
|
|
108
|
+
set: "full"
|
|
109
|
+
},
|
|
68
110
|
{
|
|
69
|
-
operationName:
|
|
70
|
-
document:
|
|
111
|
+
operationName: y,
|
|
112
|
+
document: x,
|
|
113
|
+
set: "full"
|
|
71
114
|
},
|
|
72
115
|
{
|
|
73
|
-
operationName:
|
|
74
|
-
document:
|
|
116
|
+
operationName: C,
|
|
117
|
+
document: w,
|
|
118
|
+
set: "full"
|
|
75
119
|
},
|
|
76
120
|
{
|
|
77
|
-
operationName:
|
|
78
|
-
document:
|
|
121
|
+
operationName: i,
|
|
122
|
+
document: s,
|
|
123
|
+
set: "base"
|
|
79
124
|
},
|
|
80
125
|
{
|
|
81
|
-
operationName:
|
|
82
|
-
document: u
|
|
126
|
+
operationName: c,
|
|
127
|
+
document: u,
|
|
128
|
+
set: "base"
|
|
83
129
|
},
|
|
84
130
|
{
|
|
85
131
|
operationName: d,
|
|
86
|
-
document:
|
|
132
|
+
document: m,
|
|
133
|
+
set: "base"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
operationName: h,
|
|
137
|
+
document: v,
|
|
138
|
+
set: "base"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
operationName: y,
|
|
142
|
+
document: S,
|
|
143
|
+
set: "base"
|
|
87
144
|
}
|
|
88
145
|
];
|
|
89
|
-
function
|
|
146
|
+
function E(e, t) {
|
|
90
147
|
return {
|
|
91
148
|
productId: e.product,
|
|
92
149
|
first: t.first,
|
|
93
150
|
after: t.after
|
|
94
151
|
};
|
|
95
152
|
}
|
|
96
|
-
function
|
|
153
|
+
function D(e, t) {
|
|
154
|
+
let n = E(e, t);
|
|
155
|
+
if (!t.filter) return n;
|
|
156
|
+
let r = Object.fromEntries(Object.entries(t.filter).filter(([, e]) => e !== void 0));
|
|
157
|
+
return {
|
|
158
|
+
...n,
|
|
159
|
+
filter: r
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
function O(e, t, n) {
|
|
97
163
|
let r = Object.fromEntries(Object.entries(n).filter(([, e]) => e !== void 0));
|
|
98
164
|
return {
|
|
99
165
|
productId: e.product,
|
|
@@ -101,7 +167,7 @@ function h(e, t, n) {
|
|
|
101
167
|
...r
|
|
102
168
|
};
|
|
103
169
|
}
|
|
104
|
-
function
|
|
170
|
+
function k(e, t) {
|
|
105
171
|
return { input: {
|
|
106
172
|
productId: e.product,
|
|
107
173
|
clientConversationId: t.clientConversationId,
|
|
@@ -115,11 +181,20 @@ function g(e, t) {
|
|
|
115
181
|
}))
|
|
116
182
|
} };
|
|
117
183
|
}
|
|
118
|
-
function
|
|
184
|
+
function A(e, t) {
|
|
119
185
|
return {
|
|
120
186
|
productId: e.product,
|
|
121
187
|
...t
|
|
122
188
|
};
|
|
123
189
|
}
|
|
190
|
+
function j(e, t, n) {
|
|
191
|
+
return { input: {
|
|
192
|
+
productId: e.product,
|
|
193
|
+
...t,
|
|
194
|
+
...n.title === void 0 ? {} : { title: n.title },
|
|
195
|
+
...n.pinned === void 0 ? {} : { pinned: n.pinned },
|
|
196
|
+
...n.archived === void 0 ? {} : { archived: n.archived }
|
|
197
|
+
} };
|
|
198
|
+
}
|
|
124
199
|
//#endregion
|
|
125
|
-
export {
|
|
200
|
+
export { i as ASSISTANT_HISTORY_CHANGES_OPERATION, o as ASSISTANT_HISTORY_CHANGES_QUERY, s as ASSISTANT_HISTORY_CHANGES_QUERY_BASE, c as ASSISTANT_HISTORY_CONVERSATIONS_OPERATION, l as ASSISTANT_HISTORY_CONVERSATIONS_QUERY, u as ASSISTANT_HISTORY_CONVERSATIONS_QUERY_BASE, x as ASSISTANT_HISTORY_DELETE_MUTATION, S as ASSISTANT_HISTORY_DELETE_MUTATION_BASE, y as ASSISTANT_HISTORY_DELETE_OPERATION, d as ASSISTANT_HISTORY_ENTRIES_OPERATION, p as ASSISTANT_HISTORY_ENTRIES_QUERY, m as ASSISTANT_HISTORY_ENTRIES_QUERY_BASE, T as ASSISTANT_HISTORY_OPERATIONS, _ as ASSISTANT_HISTORY_SAVE_MUTATION, v as ASSISTANT_HISTORY_SAVE_MUTATION_BASE, h as ASSISTANT_HISTORY_SAVE_OPERATION, w as ASSISTANT_HISTORY_UPDATE_MUTATION, C as ASSISTANT_HISTORY_UPDATE_OPERATION, A as buildHistoryDeleteVariables, O as buildHistoryEntriesVariables, D as buildHistoryListVariables, E as buildHistoryPageVariables, k as buildHistorySaveVariables, j as buildHistoryUpdateVariables };
|
|
@@ -6,8 +6,15 @@ import { AssistantHistoryConvKey, AssistantHistoryHeader, AssistantHistoryScopeK
|
|
|
6
6
|
export interface AssistantHistoryOlderHeaders {
|
|
7
7
|
scopeKey: AssistantHistoryScopeKey;
|
|
8
8
|
headers: Readonly<Record<AssistantHistoryConvKey, AssistantHistoryHeader>>;
|
|
9
|
-
/** More pages remain on the server. */
|
|
9
|
+
/** More pages remain on the server — for the listing `filterKey` names. */
|
|
10
10
|
hasMore: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* The filter the latest page was listed with (`historyFilterKey`; "" for
|
|
13
|
+
* none). The headers stay whatever filter found them — each is a real
|
|
14
|
+
* header at its revision, which the list filters again — but `hasMore`
|
|
15
|
+
* answers for this listing only.
|
|
16
|
+
*/
|
|
17
|
+
filterKey: string;
|
|
11
18
|
}
|
|
12
19
|
/**
|
|
13
20
|
* A delete made here that is not saved on this device yet: the browser refused
|
|
@@ -19,6 +26,13 @@ export interface AssistantHistoryUnsavedDelete {
|
|
|
19
26
|
conversationId: string;
|
|
20
27
|
at: number;
|
|
21
28
|
}
|
|
29
|
+
/** A pin the server refused: the person already has the most pinned conversations it keeps (BOFF-8159). */
|
|
30
|
+
export interface AssistantHistoryPinLimitNotice {
|
|
31
|
+
conversationId: string;
|
|
32
|
+
/** The cap the server enforces, for the notice's text. */
|
|
33
|
+
limit: number;
|
|
34
|
+
at: number;
|
|
35
|
+
}
|
|
22
36
|
/** A conversation this page showed was deleted somewhere else (for the "deleted on another device" notice). */
|
|
23
37
|
export interface AssistantHistoryRemoteDelete {
|
|
24
38
|
conversationId: string;
|
|
@@ -44,6 +58,16 @@ export interface AssistantHistoryStatusState {
|
|
|
44
58
|
remoteDelete?: AssistantHistoryRemoteDelete;
|
|
45
59
|
/** The latest delete made here that is neither saved on this device nor confirmed by the server. */
|
|
46
60
|
unsavedDelete?: AssistantHistoryUnsavedDelete;
|
|
61
|
+
/**
|
|
62
|
+
* The server has the history controls (BOFF-8159) — pin, archive, synced
|
|
63
|
+
* rename, the list filter. False while the transport's drift fallback is
|
|
64
|
+
* reading without them: the list then offers none of them (and behaves as
|
|
65
|
+
* before them), and queued control changes wait. True until an answer says
|
|
66
|
+
* otherwise, and NOT reset by a scope change: it describes the server.
|
|
67
|
+
*/
|
|
68
|
+
controlsAvailable: boolean;
|
|
69
|
+
/** The latest pin the server refused for the cap (cleared on a scope change). */
|
|
70
|
+
pinLimit?: AssistantHistoryPinLimitNotice;
|
|
47
71
|
setHistoryScope: (product: string | null, scopeKey: AssistantHistoryScopeKey | null) => void;
|
|
48
72
|
setConversationLoading: (id: string, loading: boolean) => void;
|
|
49
73
|
setConversationLoadError: (id: string, failed: boolean) => void;
|
|
@@ -51,6 +75,8 @@ export interface AssistantHistoryStatusState {
|
|
|
51
75
|
setOlderHeaders: (older: AssistantHistoryOlderHeaders | undefined) => void;
|
|
52
76
|
noteRemoteDelete: (notice: AssistantHistoryRemoteDelete | undefined) => void;
|
|
53
77
|
noteUnsavedDelete: (notice: AssistantHistoryUnsavedDelete | undefined) => void;
|
|
78
|
+
setControlsAvailable: (available: boolean) => void;
|
|
79
|
+
notePinLimit: (notice: AssistantHistoryPinLimitNotice | undefined) => void;
|
|
54
80
|
}
|
|
55
81
|
/** A request's generation: its response applies only while this still matches. */
|
|
56
82
|
export interface AssistantHistoryGeneration {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"historyStatus.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,wBAAwB,CAAC;IACnC,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,uBAAuB,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAC3E,
|
|
1
|
+
{"version":3,"file":"historyStatus.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyStatus.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,KAAK,EACV,uBAAuB,EACvB,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,gBAAgB,CAAC;AAExB;;;GAGG;AACH,MAAM,WAA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KAAK,eAAe,GAAG,IAAI,CAAC,2BAA2B,EAAE,UAAU,GAAG,OAAO,CAAC,CAAC;AAE/E,yFAAyF;AACzF,wBAAgB,4BAA4B,CAC1C,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,0BAA0B,GAAG,IAAI,CAEnC;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CACjD,UAAU,EAAE,0BAA0B,EACtC,KAAK,EAAE,eAAe,EACtB,QAAQ,EAAE,MAAM,GAAG,IAAI,GACtB,OAAO,CAMT"}
|
|
@@ -15,13 +15,15 @@ var n = () => e()((e) => ({
|
|
|
15
15
|
epoch: 0,
|
|
16
16
|
loadingIds: {},
|
|
17
17
|
loadErrorIds: {},
|
|
18
|
+
controlsAvailable: !0,
|
|
18
19
|
setHistoryScope: (t, n) => e((e) => e.product === t && e.scopeKey === n ? {} : {
|
|
19
20
|
product: t,
|
|
20
21
|
scopeKey: n,
|
|
21
22
|
epoch: e.epoch + 1,
|
|
22
23
|
loadingIds: {},
|
|
23
24
|
loadErrorIds: {},
|
|
24
|
-
olderHeaders: void 0
|
|
25
|
+
olderHeaders: void 0,
|
|
26
|
+
pinLimit: void 0
|
|
25
27
|
}),
|
|
26
28
|
setConversationLoading: (n, r) => e((e) => ({ loadingIds: t(e.loadingIds, n, r) })),
|
|
27
29
|
setConversationLoadError: (n, r) => e((e) => ({ loadErrorIds: t(e.loadErrorIds, n, r) })),
|
|
@@ -31,7 +33,9 @@ var n = () => e()((e) => ({
|
|
|
31
33
|
})),
|
|
32
34
|
setOlderHeaders: (t) => e(() => ({ olderHeaders: t })),
|
|
33
35
|
noteRemoteDelete: (t) => e(() => ({ remoteDelete: t })),
|
|
34
|
-
noteUnsavedDelete: (t) => e((e) => e.unsavedDelete === void 0 && t === void 0 ? {} : { unsavedDelete: t })
|
|
36
|
+
noteUnsavedDelete: (t) => e((e) => e.unsavedDelete === void 0 && t === void 0 ? {} : { unsavedDelete: t }),
|
|
37
|
+
setControlsAvailable: (t) => e((e) => e.controlsAvailable === t ? {} : { controlsAvailable: t }),
|
|
38
|
+
notePinLimit: (t) => e((e) => e.pinLimit === void 0 && t === void 0 ? {} : { pinLimit: t })
|
|
35
39
|
})), r = n();
|
|
36
40
|
function i(e, t) {
|
|
37
41
|
return e.scopeKey === null ? null : {
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { AssistantHistoryConvKey, AssistantHistoryDeleteItem, AssistantHistoryHeader, AssistantHistoryOutboxItem, AssistantHistoryPersisted, AssistantHistoryScopeKey, AssistantHistoryScopeState, AssistantHistoryTombstone } from './historyTypes';
|
|
1
|
+
import { AssistantHistoryConvKey, AssistantHistoryDeleteItem, AssistantHistoryHeader, AssistantHistoryOutboxItem, AssistantHistoryPersisted, AssistantHistoryScopeKey, AssistantHistoryScopeState, AssistantHistoryTombstone, AssistantHistoryUpdateItem } from './historyTypes';
|
|
2
2
|
import { ProfileBoundStorage } from './profileBoundStorage';
|
|
3
3
|
/** The base storage name; the profile prefix is added by the bound storage. */
|
|
4
4
|
export declare const ASSISTANT_HISTORY_STORAGE_NAME = "hb-ai-assistant-history";
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Headers kept per scope; the oldest by `updatedAt` go first — except a
|
|
7
|
+
* pinned one (BOFF-8159), which is never evicted (there are at most 50).
|
|
8
|
+
*/
|
|
6
9
|
export declare const ASSISTANT_HISTORY_MAX_HEADERS = 300;
|
|
7
10
|
/** Tombstones kept at most; confirmed ones go first, oldest first. */
|
|
8
11
|
export declare const ASSISTANT_HISTORY_MAX_TOMBSTONES = 1000;
|
|
@@ -12,19 +15,26 @@ export declare const ASSISTANT_HISTORY_DONE_TTL_MS: number;
|
|
|
12
15
|
export declare const ASSISTANT_HISTORY_TOMBSTONE_TTL_MS: number;
|
|
13
16
|
export declare function emptyAssistantHistoryPersisted(): AssistantHistoryPersisted;
|
|
14
17
|
export declare function emptyAssistantHistoryScopeState(gen?: number): AssistantHistoryScopeState;
|
|
18
|
+
/** The header carries the history controls (BOFF-8159). */
|
|
19
|
+
export declare function headerHasControls(header: AssistantHistoryHeader): boolean;
|
|
15
20
|
/**
|
|
16
21
|
* Whatever storage held, as a well-formed state (never thrown). What this
|
|
17
22
|
* build cannot read at all — an unknown outbox item, a top-level key — is not
|
|
18
23
|
* in the result; a write puts it back from the key (`keepUnrecognised`).
|
|
19
24
|
*/
|
|
20
25
|
export declare function readAssistantHistoryPersisted(value: unknown): AssistantHistoryPersisted;
|
|
21
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* Keep the newest headers (by `updatedAt`); `hasOlderHeaders` records that
|
|
28
|
+
* some were dropped. A pinned header is kept whatever its age (BOFF-8159):
|
|
29
|
+
* the pinned rows lead the list, and there are at most {@link MAX_PINNED} —
|
|
30
|
+
* past that (a copy that can only come from a bug) the newest pins are kept.
|
|
31
|
+
*/
|
|
22
32
|
export declare function boundAssistantHistoryHeaders(scope: AssistantHistoryScopeState, max?: number): AssistantHistoryScopeState;
|
|
23
33
|
/**
|
|
24
34
|
* Apply what the state itself records as finished: acknowledged items leave
|
|
25
|
-
* the outbox, and a tombstoned conversation loses its queued saves
|
|
26
|
-
* item covers the server) and its header. Pure; returns
|
|
27
|
-
* nothing changes.
|
|
35
|
+
* the outbox, and a tombstoned conversation loses its queued saves and control
|
|
36
|
+
* changes (its delete item covers the server) and its header. Pure; returns
|
|
37
|
+
* the same object when nothing changes.
|
|
28
38
|
*/
|
|
29
39
|
export declare function settleAssistantHistory(state: AssistantHistoryPersisted): AssistantHistoryPersisted;
|
|
30
40
|
/**
|
|
@@ -80,8 +90,20 @@ export interface AssistantHistoryFeedPageUpdate {
|
|
|
80
90
|
at: number;
|
|
81
91
|
}
|
|
82
92
|
export interface AssistantHistoryStoreActions {
|
|
83
|
-
/** Add an item to the outbox (no-op for an id already present or finished, or a save for a deleted conversation). */
|
|
93
|
+
/** Add an item to the outbox (no-op for an id already present or finished, or a save or update for a deleted conversation). */
|
|
84
94
|
enqueueHistoryItem: (item: AssistantHistoryOutboxItem) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Queue a control change (BOFF-8159) in place of `supersedes` — an unsent
|
|
97
|
+
* change to the same conversation that `item` already folds in — in ONE
|
|
98
|
+
* set: that one is finished (`doneItemIds`, so no other copy brings it back)
|
|
99
|
+
* and `item` takes its place in the queue; with none, `item` is appended.
|
|
100
|
+
*/
|
|
101
|
+
queueHistoryUpdate: (item: AssistantHistoryUpdateItem, supersedes: string | null, at: number) => void;
|
|
102
|
+
/**
|
|
103
|
+
* The scope's headers were re-read from the start of the feed with the
|
|
104
|
+
* controls (`ctl`). Refused (false) when the scope was reset since `gen`.
|
|
105
|
+
*/
|
|
106
|
+
markHistoryScopeControls: (scopeKey: AssistantHistoryScopeKey, gen: number) => boolean;
|
|
85
107
|
/** Replace an item still in the outbox (attempts, backoff, parking). Its id and type cannot change. */
|
|
86
108
|
updateHistoryItem: (id: string, patch: (item: AssistantHistoryOutboxItem) => AssistantHistoryOutboxItem) => void;
|
|
87
109
|
/** Finish items (acknowledged, or dropped): removed, and remembered so no other tab's copy can bring them back. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"historyStore.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;
|
|
1
|
+
{"version":3,"file":"historyStore.d.ts","sourceRoot":"","sources":["../../../../src/shared/assistant/history/historyStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAMH,OAAO,KAAK,EACV,uBAAuB,EACvB,0BAA0B,EAC1B,sBAAsB,EACtB,0BAA0B,EAC1B,yBAAyB,EAEzB,wBAAwB,EACxB,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC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