@epam/ai-dial-chat-hooks 1.2.0-dev.288 → 1.2.0-dev.300
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.
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { MessageRole as e } from "@epam/ai-dial-chat-shared";
|
|
2
2
|
//#region src/conversation/useConversationHandlers/message-utils.ts
|
|
3
|
-
var t = (e) => e != null && Object.keys(e).length > 0, n = (e,
|
|
3
|
+
var t = (e) => e != null && Object.keys(e).length > 0, n = (e, n) => t(n) ? {
|
|
4
|
+
...e,
|
|
5
|
+
configuration_value: n
|
|
6
|
+
} : e, r = (e, t) => (e?.length ?? 0) === (t?.length ?? 0) ? (e ?? []).some((e, n) => e.url !== t?.[n]?.url) : !0, i = (e, t, n, i, a) => {
|
|
4
7
|
if (t !== e.content || i.length > 0) return !0;
|
|
5
8
|
let o = e.custom_content?.attachments?.length ?? 0;
|
|
6
|
-
return
|
|
7
|
-
},
|
|
9
|
+
return n.length === o ? a != null && r(e.custom_content?.skills, a) : !0;
|
|
10
|
+
}, a = (t) => t == null || t.role !== e.Assistant || !!t.wasStoppedByUser || t.streamErrorMessage != null, o = (e, t, n, r, o, s) => {
|
|
8
11
|
let c = e[t];
|
|
9
|
-
return c ?
|
|
12
|
+
return c ? i(c, n, r, o, s) || a(e[t + 1]) : !1;
|
|
10
13
|
};
|
|
11
14
|
//#endregion
|
|
12
|
-
export { t as hasActiveToolConfig,
|
|
15
|
+
export { t as hasActiveToolConfig, a as isAnswerIncomplete, i as isMessageChanged, o as shouldRerunGenerationOnEdit, n as withToolConfiguration };
|
|
@@ -1,112 +1,109 @@
|
|
|
1
1
|
import { useAttachmentUpload as e } from "../useAttachmentUpload/useAttachmentUpload.js";
|
|
2
2
|
import { attachmentsToDtos as t } from "./attachment-to-dto.js";
|
|
3
3
|
import { createMessagePair as n } from "./message-factory.js";
|
|
4
|
-
import { hasActiveToolConfig as r, shouldRerunGenerationOnEdit as i } from "./message-utils.js";
|
|
5
|
-
import { getStarterDisplayText as
|
|
6
|
-
import { getConversationPath as
|
|
7
|
-
import { MessageRole as
|
|
8
|
-
import { useCallback as
|
|
9
|
-
import { SendCompletionDtoModeEnum as
|
|
4
|
+
import { hasActiveToolConfig as r, shouldRerunGenerationOnEdit as i, withToolConfiguration as a } from "./message-utils.js";
|
|
5
|
+
import { getStarterDisplayText as o, getStarterSubmitText as s } from "./starter-option.js";
|
|
6
|
+
import { getConversationPath as c } from "../useConversationStream/conversation-path.js";
|
|
7
|
+
import { MessageRole as l, generateUUID as u } from "@epam/ai-dial-chat-shared";
|
|
8
|
+
import { useCallback as d, useState as f } from "react";
|
|
9
|
+
import { SendCompletionDtoModeEnum as p } from "@epam/ai-dial-chat-api-client";
|
|
10
10
|
//#region src/conversation/useConversationHandlers/useConversationHandlers.ts
|
|
11
|
-
var
|
|
12
|
-
let [
|
|
13
|
-
filesApi:
|
|
14
|
-
bucket:
|
|
15
|
-
onNetworkError:
|
|
16
|
-
}),
|
|
17
|
-
if (!
|
|
18
|
-
let o = t(i), s = r(
|
|
11
|
+
var m = ({ conversation: m, conversationId: h, bucket: g, isStreaming: _, startStream: v, state: { setConversation: y, conversationRef: b }, filesApi: x, conversationsApi: S, rateApi: C, resolveModelId: w, onConversationDeleted: T, showNetworkError: E, toolConfigurationValue: D }) => {
|
|
12
|
+
let [O, k] = f(null), [A, j] = f(/* @__PURE__ */ new Set()), [M, N] = f(null), { handleUploadAttachment: P } = e({
|
|
13
|
+
filesApi: x,
|
|
14
|
+
bucket: g,
|
|
15
|
+
onNetworkError: E
|
|
16
|
+
}), F = d(async (e, i, a) => {
|
|
17
|
+
if (!h || !m) return;
|
|
18
|
+
let o = t(i), s = r(D), c = o?.length || s || a?.length ? {
|
|
19
19
|
...o?.length ? { attachments: o } : {},
|
|
20
|
-
...s ? { configuration_value:
|
|
20
|
+
...s ? { configuration_value: D } : {},
|
|
21
21
|
...a?.length ? { skills: a } : {}
|
|
22
|
-
} : void 0,
|
|
23
|
-
|
|
22
|
+
} : void 0, l = w(), { userMessage: d, assistantMessage: f } = n(e, c, l);
|
|
23
|
+
y((e) => {
|
|
24
24
|
if (!e) return e;
|
|
25
25
|
let t = {
|
|
26
26
|
...e,
|
|
27
27
|
messages: [
|
|
28
28
|
...e.messages,
|
|
29
29
|
d,
|
|
30
|
-
|
|
30
|
+
f
|
|
31
31
|
]
|
|
32
32
|
};
|
|
33
|
-
return
|
|
34
|
-
}),
|
|
33
|
+
return b.current = t, t;
|
|
34
|
+
}), v(h, e, m.messages.length + 1, l, c, u(), p.Append);
|
|
35
35
|
}, [
|
|
36
|
-
p,
|
|
37
36
|
m,
|
|
37
|
+
h,
|
|
38
|
+
b,
|
|
39
|
+
w,
|
|
38
40
|
y,
|
|
39
|
-
C,
|
|
40
41
|
v,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (g || !m || !t || e === -1 || t.messages[e]?.role !== c.Assistant) return;
|
|
42
|
+
D
|
|
43
|
+
]), I = d((e) => {
|
|
44
|
+
let t = b.current;
|
|
45
|
+
if (_ || !h || !t || e === -1 || t.messages[e]?.role !== l.Assistant) return;
|
|
46
46
|
let n = t.messages[e - 1];
|
|
47
|
-
if (!n || n.role !==
|
|
48
|
-
let
|
|
49
|
-
...n.custom_content,
|
|
50
|
-
configuration_value: E
|
|
51
|
-
} : n.custom_content, o = {
|
|
47
|
+
if (!n || n.role !== l.User) return;
|
|
48
|
+
let r = w(), i = a(n.custom_content, D), o = {
|
|
52
49
|
...t.messages[e],
|
|
53
50
|
content: "",
|
|
54
51
|
custom_content: void 0,
|
|
55
52
|
wasStoppedByUser: void 0,
|
|
56
53
|
stoppedWithoutContent: void 0,
|
|
57
54
|
streamErrorMessage: void 0,
|
|
58
|
-
deploymentId:
|
|
55
|
+
deploymentId: r
|
|
59
56
|
}, s = {
|
|
60
57
|
...t,
|
|
61
58
|
messages: [
|
|
62
59
|
...t.messages.slice(0, e - 1),
|
|
63
60
|
{
|
|
64
61
|
...n,
|
|
65
|
-
custom_content:
|
|
62
|
+
custom_content: i
|
|
66
63
|
},
|
|
67
64
|
o
|
|
68
65
|
]
|
|
69
66
|
};
|
|
70
|
-
|
|
67
|
+
b.current = s, y(s), j((t) => new Set([...t].filter((t) => t < e))), v(h, n.content, e, r, i, u(), p.Regenerate);
|
|
71
68
|
}, [
|
|
72
|
-
|
|
69
|
+
h,
|
|
70
|
+
b,
|
|
71
|
+
_,
|
|
72
|
+
w,
|
|
73
73
|
y,
|
|
74
|
-
g,
|
|
75
|
-
C,
|
|
76
74
|
v,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
let t = y.current;
|
|
75
|
+
D
|
|
76
|
+
]), L = d((e) => {
|
|
77
|
+
_ || k(e);
|
|
78
|
+
}, [_]), R = d(() => {
|
|
79
|
+
if (!h || O == null) return;
|
|
80
|
+
let e = O;
|
|
81
|
+
k(null);
|
|
82
|
+
let t = b.current;
|
|
86
83
|
if (!t || e === -1) return;
|
|
87
|
-
let n =
|
|
88
|
-
if (r.length === 0 || r.length === 1 && r[0].role ===
|
|
89
|
-
|
|
84
|
+
let n = c(h), r = t.messages[e + 1]?.role === l.Assistant ? t.messages.filter((t, n) => n !== e && n !== e + 1) : t.messages.filter((t, n) => n !== e);
|
|
85
|
+
if (r.length === 0 || r.length === 1 && r[0].role === l.Status) {
|
|
86
|
+
S.deleteConversation({ path: n }), T?.();
|
|
90
87
|
return;
|
|
91
88
|
}
|
|
92
89
|
let i = {
|
|
93
90
|
...t,
|
|
94
91
|
messages: r
|
|
95
92
|
};
|
|
96
|
-
|
|
93
|
+
b.current = i, y(i), S.saveConversation({
|
|
97
94
|
path: n,
|
|
98
95
|
saveConversationBodyDto: { conversation: i }
|
|
99
96
|
});
|
|
100
97
|
}, [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
]),
|
|
108
|
-
let r =
|
|
109
|
-
if (!
|
|
98
|
+
h,
|
|
99
|
+
b,
|
|
100
|
+
S,
|
|
101
|
+
T,
|
|
102
|
+
O,
|
|
103
|
+
y
|
|
104
|
+
]), z = d(async (e, t, n) => {
|
|
105
|
+
let r = b.current;
|
|
106
|
+
if (!h || !r) return !1;
|
|
110
107
|
let i = r.messages[e];
|
|
111
108
|
if (!i) return !1;
|
|
112
109
|
let a = i.rating, o = {
|
|
@@ -116,9 +113,9 @@ var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startS
|
|
|
116
113
|
rating: t ?? void 0
|
|
117
114
|
} : n)
|
|
118
115
|
};
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
|
|
116
|
+
y(() => (b.current = o, o));
|
|
117
|
+
let s = c(h), l = () => {
|
|
118
|
+
y((t) => {
|
|
122
119
|
if (!t) return t;
|
|
123
120
|
let n = {
|
|
124
121
|
...t,
|
|
@@ -127,15 +124,15 @@ var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startS
|
|
|
127
124
|
rating: a
|
|
128
125
|
} : t)
|
|
129
126
|
};
|
|
130
|
-
return
|
|
127
|
+
return b.current = n, n;
|
|
131
128
|
});
|
|
132
|
-
}, u = () =>
|
|
133
|
-
path:
|
|
129
|
+
}, u = () => S.saveConversation({
|
|
130
|
+
path: s,
|
|
134
131
|
saveConversationBodyDto: { conversation: o }
|
|
135
132
|
}), d = i.responseId;
|
|
136
133
|
if (!d) return l(), !1;
|
|
137
134
|
try {
|
|
138
|
-
return await
|
|
135
|
+
return await C.rateMessage({ rateMessageDto: {
|
|
139
136
|
conversationId: r.id,
|
|
140
137
|
responseId: d,
|
|
141
138
|
modelId: r.model.id,
|
|
@@ -146,127 +143,128 @@ var p = ({ conversation: p, conversationId: m, bucket: h, isStreaming: g, startS
|
|
|
146
143
|
return l(), !1;
|
|
147
144
|
}
|
|
148
145
|
}, [
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
x,
|
|
146
|
+
h,
|
|
147
|
+
b,
|
|
152
148
|
S,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
149
|
+
C,
|
|
150
|
+
y
|
|
151
|
+
]), B = d((e, t, i) => {
|
|
152
|
+
let a = b.current;
|
|
153
|
+
if (!h || !a) return;
|
|
154
|
+
let c = o(e, i), l = s(e, i), d = t ? { [t]: e.const } : void 0, f = r(D), m = d || f ? {
|
|
158
155
|
...d ? { form_value: d } : {},
|
|
159
|
-
...
|
|
160
|
-
} : void 0, g =
|
|
161
|
-
|
|
156
|
+
...f ? { configuration_value: D } : {}
|
|
157
|
+
} : void 0, g = w(), { userMessage: _, assistantMessage: x } = n(c, m, g);
|
|
158
|
+
y((e) => {
|
|
162
159
|
if (!e) return e;
|
|
163
160
|
let t = {
|
|
164
161
|
...e,
|
|
165
162
|
messages: [
|
|
166
163
|
...e.messages,
|
|
167
|
-
|
|
164
|
+
_,
|
|
168
165
|
x
|
|
169
166
|
]
|
|
170
167
|
};
|
|
171
|
-
return
|
|
172
|
-
}),
|
|
168
|
+
return b.current = t, t;
|
|
169
|
+
}), v(h, l, a.messages.length + 1, g, m, u(), p.Append);
|
|
173
170
|
}, [
|
|
174
|
-
|
|
171
|
+
h,
|
|
172
|
+
b,
|
|
173
|
+
w,
|
|
175
174
|
y,
|
|
176
|
-
C,
|
|
177
175
|
v,
|
|
178
|
-
|
|
179
|
-
E
|
|
176
|
+
D
|
|
180
177
|
]);
|
|
181
178
|
return {
|
|
182
|
-
handleSend:
|
|
183
|
-
handleUploadAttachment:
|
|
184
|
-
handleRegenerateMessage:
|
|
185
|
-
handleDeleteMessage:
|
|
186
|
-
handleConfirmDelete:
|
|
187
|
-
handleRateMessage:
|
|
188
|
-
handleButtonSelect:
|
|
189
|
-
let r =
|
|
190
|
-
!
|
|
179
|
+
handleSend: F,
|
|
180
|
+
handleUploadAttachment: P,
|
|
181
|
+
handleRegenerateMessage: I,
|
|
182
|
+
handleDeleteMessage: L,
|
|
183
|
+
handleConfirmDelete: R,
|
|
184
|
+
handleRateMessage: z,
|
|
185
|
+
handleButtonSelect: d((e, t, n) => {
|
|
186
|
+
let r = b.current;
|
|
187
|
+
!h || !r || _ || (e["dial:widgetOptions"].confirmationMessage ? N({
|
|
191
188
|
starter: e,
|
|
192
189
|
propertyKey: t,
|
|
193
190
|
description: n
|
|
194
|
-
}) :
|
|
191
|
+
}) : B(e, t, n));
|
|
195
192
|
}, [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
193
|
+
h,
|
|
194
|
+
b,
|
|
195
|
+
_,
|
|
196
|
+
B
|
|
200
197
|
]),
|
|
201
|
-
handleConfirmStarter:
|
|
202
|
-
if (!
|
|
203
|
-
let { starter: e, propertyKey: t, description: n } =
|
|
204
|
-
|
|
205
|
-
}, [
|
|
206
|
-
handleStartEdit:
|
|
207
|
-
|
|
198
|
+
handleConfirmStarter: d(() => {
|
|
199
|
+
if (!M) return;
|
|
200
|
+
let { starter: e, propertyKey: t, description: n } = M;
|
|
201
|
+
N(null), B(e, t, n);
|
|
202
|
+
}, [M, B]),
|
|
203
|
+
handleStartEdit: d((e) => {
|
|
204
|
+
j((t) => new Set([...t, e]));
|
|
208
205
|
}, []),
|
|
209
|
-
handleCancelEdit:
|
|
210
|
-
|
|
206
|
+
handleCancelEdit: d((e) => {
|
|
207
|
+
j((t) => {
|
|
211
208
|
let n = new Set(t);
|
|
212
209
|
return n.delete(e), n;
|
|
213
210
|
});
|
|
214
211
|
}, []),
|
|
215
|
-
handleEditMessage:
|
|
216
|
-
let
|
|
217
|
-
if (
|
|
218
|
-
let
|
|
219
|
-
if (
|
|
220
|
-
let
|
|
221
|
-
if (!i(
|
|
222
|
-
|
|
212
|
+
handleEditMessage: d(async (e, n, r, o, s) => {
|
|
213
|
+
let c = b.current;
|
|
214
|
+
if (_ || !h || !c) return;
|
|
215
|
+
let d = e;
|
|
216
|
+
if (d === -1 || c.messages[d].role !== l.User) return;
|
|
217
|
+
let f = c.messages[d];
|
|
218
|
+
if (!i(c.messages, d, n, r, o, s)) {
|
|
219
|
+
j((e) => {
|
|
223
220
|
let t = new Set(e);
|
|
224
|
-
return t.delete(
|
|
221
|
+
return t.delete(d), t;
|
|
225
222
|
});
|
|
226
223
|
return;
|
|
227
224
|
}
|
|
228
|
-
let
|
|
225
|
+
let m = t(o), g = new Set(r.map((e) => e.id)), x = [...(f.custom_content?.attachments ?? []).filter((e) => {
|
|
229
226
|
let t = e.url ?? e.data ?? e.title;
|
|
230
|
-
return
|
|
231
|
-
}), ...
|
|
232
|
-
|
|
233
|
-
...
|
|
234
|
-
...
|
|
235
|
-
...
|
|
236
|
-
} : Object.keys(
|
|
237
|
-
let
|
|
238
|
-
...
|
|
227
|
+
return g.has(t);
|
|
228
|
+
}), ...m ?? []], { attachments: S, skills: C, ...T } = f.custom_content ?? {}, E = s ?? C, O;
|
|
229
|
+
O = x.length > 0 || E?.length ? {
|
|
230
|
+
...T,
|
|
231
|
+
...x.length > 0 ? { attachments: x } : {},
|
|
232
|
+
...E?.length ? { skills: E } : {}
|
|
233
|
+
} : Object.keys(T).length > 0 ? T : void 0, O = a(O, D);
|
|
234
|
+
let k = {
|
|
235
|
+
...f,
|
|
239
236
|
content: n,
|
|
240
|
-
custom_content:
|
|
241
|
-
},
|
|
242
|
-
role:
|
|
237
|
+
custom_content: O
|
|
238
|
+
}, A = Date.now(), M = {
|
|
239
|
+
role: l.Assistant,
|
|
243
240
|
content: "",
|
|
244
|
-
timestamp: new Date(
|
|
245
|
-
},
|
|
246
|
-
...
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
],
|
|
250
|
-
...
|
|
251
|
-
messages:
|
|
241
|
+
timestamp: new Date(A).toISOString()
|
|
242
|
+
}, N = [
|
|
243
|
+
...c.messages.slice(0, d),
|
|
244
|
+
k,
|
|
245
|
+
M
|
|
246
|
+
], P = {
|
|
247
|
+
...c,
|
|
248
|
+
messages: N
|
|
252
249
|
};
|
|
253
|
-
|
|
254
|
-
let
|
|
255
|
-
|
|
250
|
+
b.current = P, y(P);
|
|
251
|
+
let F = w();
|
|
252
|
+
v(h, n, N.length - 1, F, O, u(), p.Edit), j(/* @__PURE__ */ new Set());
|
|
256
253
|
}, [
|
|
257
|
-
|
|
254
|
+
h,
|
|
255
|
+
b,
|
|
256
|
+
_,
|
|
257
|
+
w,
|
|
258
258
|
y,
|
|
259
|
-
g,
|
|
260
|
-
C,
|
|
261
259
|
v,
|
|
262
|
-
|
|
260
|
+
D
|
|
263
261
|
]),
|
|
264
|
-
editingMessageIndexes:
|
|
265
|
-
pendingDeleteIndex:
|
|
266
|
-
setPendingDeleteIndex:
|
|
267
|
-
pendingStarterContext:
|
|
268
|
-
setPendingStarterContext:
|
|
262
|
+
editingMessageIndexes: A,
|
|
263
|
+
pendingDeleteIndex: O,
|
|
264
|
+
setPendingDeleteIndex: k,
|
|
265
|
+
pendingStarterContext: M,
|
|
266
|
+
setPendingStarterContext: N
|
|
269
267
|
};
|
|
270
268
|
};
|
|
271
269
|
//#endregion
|
|
272
|
-
export {
|
|
270
|
+
export { m as useConversationHandlers };
|
package/conversation.d.ts
CHANGED
|
@@ -454,7 +454,7 @@ export declare const getFormSchemaToolSyncKey: (conversationId: string, messages
|
|
|
454
454
|
* an edit truncates past one: the marker is appended at the end of the
|
|
455
455
|
* timeline, so truncating at an earlier message drops it, and the model the
|
|
456
456
|
* user picked reverted on the next page load even though the answer had been
|
|
457
|
-
* regenerated on it (
|
|
457
|
+
* regenerated on it ([#8712](https://github.com/epam/ai-dial-chat/issues/8712)). The assistant message the backend writes
|
|
458
458
|
* carries the deployment that produced it, which survives that truncation
|
|
459
459
|
* because it *is* the regenerated message.
|
|
460
460
|
*/
|
package/file-manager.d.ts
CHANGED
|
@@ -581,7 +581,7 @@ export declare interface PreparedCopyMoveItem<TDto> {
|
|
|
581
581
|
export declare const prepareDownloadDestination: (filename: string, mimeType?: string) => Promise<DownloadDestination>;
|
|
582
582
|
|
|
583
583
|
/**
|
|
584
|
-
* Rename-vs-move disambiguation (design.md D3): entries whose parent folder
|
|
584
|
+
* Rename-vs-move disambiguation (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D3): entries whose parent folder
|
|
585
585
|
* is unchanged become `renameDtos`; entries whose parent folder changed
|
|
586
586
|
* become `preparedMoveItems`.
|
|
587
587
|
*/
|
|
@@ -706,7 +706,7 @@ export declare type UploadMode = 'overwrite' | 'create-only';
|
|
|
706
706
|
* tree's expand/collapse state, search, and the shared per-folder cache that
|
|
707
707
|
* `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
|
|
708
708
|
* through `invalidateFolders`/`bumpRetry` after their own mutations settle
|
|
709
|
-
* (design.md D1) — this hook is the sole owner/writer of that cache.
|
|
709
|
+
* (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1) — this hook is the sole owner/writer of that cache.
|
|
710
710
|
*
|
|
711
711
|
* Supports three listing sources via `activeTab`:
|
|
712
712
|
* - my_files: user's own bucket via `DialFilesApi.listFiles`
|
|
@@ -766,7 +766,7 @@ export declare interface UseDialFileListingResult {
|
|
|
766
766
|
/**
|
|
767
767
|
* Deletes the given API-path cache keys so the next listing fetch/expand for
|
|
768
768
|
* that folder re-fetches from the server. The only way sibling sub-hooks may
|
|
769
|
-
* invalidate the shared cache (design.md D1).
|
|
769
|
+
* invalidate the shared cache (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1).
|
|
770
770
|
*/
|
|
771
771
|
invalidateFolders: (apiPaths: string[]) => void;
|
|
772
772
|
/** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
|
package/index.d.ts
CHANGED
|
@@ -1873,7 +1873,7 @@ export declare const getFormSchemaToolSyncKey: (conversationId: string, messages
|
|
|
1873
1873
|
* an edit truncates past one: the marker is appended at the end of the
|
|
1874
1874
|
* timeline, so truncating at an earlier message drops it, and the model the
|
|
1875
1875
|
* user picked reverted on the next page load even though the answer had been
|
|
1876
|
-
* regenerated on it (
|
|
1876
|
+
* regenerated on it ([#8712](https://github.com/epam/ai-dial-chat/issues/8712)). The assistant message the backend writes
|
|
1877
1877
|
* carries the deployment that produced it, which survives that truncation
|
|
1878
1878
|
* because it *is* the regenerated message.
|
|
1879
1879
|
*/
|
|
@@ -3125,7 +3125,7 @@ export declare interface PreparedCopyMoveItem<TDto> {
|
|
|
3125
3125
|
export declare const prepareDownloadDestination: (filename: string, mimeType?: string) => Promise<DownloadDestination>;
|
|
3126
3126
|
|
|
3127
3127
|
/**
|
|
3128
|
-
* Rename-vs-move disambiguation (design.md D3): entries whose parent folder
|
|
3128
|
+
* Rename-vs-move disambiguation (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D3): entries whose parent folder
|
|
3129
3129
|
* is unchanged become `renameDtos`; entries whose parent folder changed
|
|
3130
3130
|
* become `preparedMoveItems`.
|
|
3131
3131
|
*/
|
|
@@ -4540,7 +4540,7 @@ export declare interface UnpackedSkillArchive {
|
|
|
4540
4540
|
/**
|
|
4541
4541
|
* Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
|
|
4542
4542
|
* — DIAL Core's whole-resource `GET` is the one place this contract still
|
|
4543
|
-
* uses a ZIP, per design.md) into its manifest text, every other entry's
|
|
4543
|
+
* uses a ZIP, per `openspec/changes/archive/2026-10-05-persist-skill-empty-folders/design.md`) into its manifest text, every other entry's
|
|
4544
4544
|
* bytes, and the folders its empty-folder markers stand for. Throws if the
|
|
4545
4545
|
* archive has no root `SKILL.md` entry.
|
|
4546
4546
|
*/
|
|
@@ -5353,7 +5353,7 @@ export declare interface UseConversationStreamResult {
|
|
|
5353
5353
|
* tree's expand/collapse state, search, and the shared per-folder cache that
|
|
5354
5354
|
* `useDialFileUploadBatch`/`useDialFileMutations`/`useDialFileSharing` invalidate
|
|
5355
5355
|
* through `invalidateFolders`/`bumpRetry` after their own mutations settle
|
|
5356
|
-
* (design.md D1) — this hook is the sole owner/writer of that cache.
|
|
5356
|
+
* (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1) — this hook is the sole owner/writer of that cache.
|
|
5357
5357
|
*
|
|
5358
5358
|
* Supports three listing sources via `activeTab`:
|
|
5359
5359
|
* - my_files: user's own bucket via `DialFilesApi.listFiles`
|
|
@@ -5413,7 +5413,7 @@ export declare interface UseDialFileListingResult {
|
|
|
5413
5413
|
/**
|
|
5414
5414
|
* Deletes the given API-path cache keys so the next listing fetch/expand for
|
|
5415
5415
|
* that folder re-fetches from the server. The only way sibling sub-hooks may
|
|
5416
|
-
* invalidate the shared cache (design.md D1).
|
|
5416
|
+
* invalidate the shared cache (`openspec/changes/archive/2026-07-21-split-use-dial-file-manager/design.md` D1).
|
|
5417
5417
|
*/
|
|
5418
5418
|
invalidateFolders: (apiPaths: string[]) => void;
|
|
5419
5419
|
/** Merges a just-created folder into its parent's cache entry (optimistic display for create-folder). */
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@epam/ai-dial-chat-hooks",
|
|
3
3
|
"description": "Framework-level React hooks extracted from AI DIAL Chat for building custom chat interfaces",
|
|
4
|
-
"version": "1.2.0-dev.
|
|
4
|
+
"version": "1.2.0-dev.300",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./index.js",
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
113
|
"dependencies": {
|
|
114
|
-
"@epam/ai-dial-chat-api-client": "1.2.0-dev.
|
|
114
|
+
"@epam/ai-dial-chat-api-client": "1.2.0-dev.300",
|
|
115
115
|
"dompurify": "3.4.16",
|
|
116
116
|
"fflate": "^0.8.3",
|
|
117
117
|
"lru-cache": "^10.4.3",
|
|
@@ -120,21 +120,21 @@
|
|
|
120
120
|
},
|
|
121
121
|
"peerDependencies": {
|
|
122
122
|
"react": "^19.2.8",
|
|
123
|
-
"@epam/ai-dial-attachment-canvas": "1.2.0-dev.
|
|
124
|
-
"@epam/ai-dial-attachment-input": "1.2.0-dev.
|
|
125
|
-
"@epam/ai-dial-catalog": "1.2.0-dev.
|
|
126
|
-
"@epam/ai-dial-chat-overlay": "1.2.0-dev.
|
|
127
|
-
"@epam/ai-dial-chat-shared": "1.2.0-dev.
|
|
128
|
-
"@epam/ai-dial-mcp-apps": "1.2.0-dev.
|
|
129
|
-
"@epam/ai-dial-publish-panel": "1.2.0-dev.
|
|
130
|
-
"@epam/ai-dial-quotations": "1.2.0-dev.
|
|
123
|
+
"@epam/ai-dial-attachment-canvas": "1.2.0-dev.300",
|
|
124
|
+
"@epam/ai-dial-attachment-input": "1.2.0-dev.300",
|
|
125
|
+
"@epam/ai-dial-catalog": "1.2.0-dev.300",
|
|
126
|
+
"@epam/ai-dial-chat-overlay": "1.2.0-dev.300",
|
|
127
|
+
"@epam/ai-dial-chat-shared": "1.2.0-dev.300",
|
|
128
|
+
"@epam/ai-dial-mcp-apps": "1.2.0-dev.300",
|
|
129
|
+
"@epam/ai-dial-publish-panel": "1.2.0-dev.300",
|
|
130
|
+
"@epam/ai-dial-quotations": "1.2.0-dev.300",
|
|
131
131
|
"@epam/ai-dial-react-file-manager": "^0.3.0-dev.25",
|
|
132
|
-
"@epam/ai-dial-scheduled-tasks": "1.2.0-dev.
|
|
133
|
-
"@epam/ai-dial-share": "1.2.0-dev.
|
|
134
|
-
"@epam/ai-dial-skill-editor": "1.2.0-dev.
|
|
135
|
-
"@epam/ai-dial-source-panel": "1.2.0-dev.
|
|
136
|
-
"@epam/ai-dial-ui-kit": "^0.15.0-dev.
|
|
137
|
-
"@epam/ai-dial-usage-dashboard": "1.2.0-dev.
|
|
132
|
+
"@epam/ai-dial-scheduled-tasks": "1.2.0-dev.300",
|
|
133
|
+
"@epam/ai-dial-share": "1.2.0-dev.300",
|
|
134
|
+
"@epam/ai-dial-skill-editor": "1.2.0-dev.300",
|
|
135
|
+
"@epam/ai-dial-source-panel": "1.2.0-dev.300",
|
|
136
|
+
"@epam/ai-dial-ui-kit": "^0.15.0-dev.39",
|
|
137
|
+
"@epam/ai-dial-usage-dashboard": "1.2.0-dev.300",
|
|
138
138
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
139
139
|
"@epam/pdf-highlighter-kit": "^0.0.19",
|
|
140
140
|
"@mcp-ui/client": "^7.1.1"
|
package/skill-editor.d.ts
CHANGED
|
@@ -431,7 +431,7 @@ export declare interface UnpackedSkillArchive {
|
|
|
431
431
|
/**
|
|
432
432
|
* Unpacks a whole-skill ZIP (as downloaded from `GET /api/v1/skills/download`
|
|
433
433
|
* — DIAL Core's whole-resource `GET` is the one place this contract still
|
|
434
|
-
* uses a ZIP, per design.md) into its manifest text, every other entry's
|
|
434
|
+
* uses a ZIP, per `openspec/changes/archive/2026-10-05-persist-skill-empty-folders/design.md`) into its manifest text, every other entry's
|
|
435
435
|
* bytes, and the folders its empty-folder markers stand for. Throws if the
|
|
436
436
|
* archive has no root `SKILL.md` entry.
|
|
437
437
|
*/
|