@burdenoff/fe-libs 2026.1007.6 → 2026.1008.1
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/shared/assistant/attachmentCommit.d.ts +175 -0
- package/dist/shared/assistant/attachmentCommit.d.ts.map +1 -0
- package/dist/shared/assistant/attachmentCommit.js +638 -0
- package/dist/shared/assistant/attachments.d.ts +39 -19
- package/dist/shared/assistant/attachments.d.ts.map +1 -1
- package/dist/shared/assistant/history/historyEngine.js +280 -280
- package/dist/shared/assistant/i18nManifest.d.ts +14 -2
- package/dist/shared/assistant/i18nManifest.d.ts.map +1 -1
- package/dist/shared/assistant/i18nManifest.js +17 -3
- package/dist/shared/assistant/index.d.ts +3 -0
- package/dist/shared/assistant/index.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.d.ts.map +1 -1
- package/dist/shared/assistant/ui/AssistantChatArea.js +1390 -1371
- package/dist/shared/assistant/ui/composer/AssistantAttachmentChips.d.ts +8 -5
- package/dist/shared/assistant/ui/composer/AssistantAttachmentChips.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantAttachmentChips.js +26 -9
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts +3 -2
- package/dist/shared/assistant/ui/composer/AssistantComposer.d.ts.map +1 -1
- package/dist/shared/assistant/ui/composer/AssistantComposer.js +214 -125
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts +10 -0
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.d.ts.map +1 -1
- package/dist/shared/assistant/ui/voice/AssistantVoiceSession.js +124 -116
- package/dist/shared/assistant/useAssistantAttachments.d.ts +20 -2
- package/dist/shared/assistant/useAssistantAttachments.d.ts.map +1 -1
- package/dist/shared/assistant/useAssistantAttachments.js +146 -202
- package/dist/shared/assistant/useAttachmentCommitter.d.ts +17 -0
- package/dist/shared/assistant/useAttachmentCommitter.d.ts.map +1 -0
- package/dist/shared/assistant/useAttachmentCommitter.js +41 -0
- package/dist/shared/assistant/voiceCommit.d.ts +36 -0
- package/dist/shared/assistant/voiceCommit.d.ts.map +1 -0
- package/dist/shared/assistant/voiceCommit.js +24 -0
- package/dist/shared-assistant.js +161 -158
- package/dist/storage/filesPort.d.ts +111 -0
- package/dist/storage/filesPort.d.ts.map +1 -0
- package/dist/storage/filesPort.js +262 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +9 -8
- package/package.json +1 -1
|
@@ -63,7 +63,12 @@ export interface AssistantInlineLimitsConfig {
|
|
|
63
63
|
}
|
|
64
64
|
export type AssistantAttachmentKind = "image" | "text" | "document";
|
|
65
65
|
export type AssistantAttachmentStatus = "pending" | "uploading" | "ready" | "error";
|
|
66
|
-
export type AttachmentRejection = "too-many" | "too-large" | "empty" | "unreadable" | "unsupported-image"
|
|
66
|
+
export type AttachmentRejection = "too-many" | "too-large" | "empty" | "unreadable" | "unsupported-image"
|
|
67
|
+
/**
|
|
68
|
+
* Over the 5 MiB the browser can upload directly, and with no text to send inline instead: it
|
|
69
|
+
* could be neither saved to Files nor read, so it is refused at attach rather than failing at Send.
|
|
70
|
+
*/
|
|
71
|
+
| "too-large-to-save";
|
|
67
72
|
/**
|
|
68
73
|
* Thrown while PREPARING a file (after it passed `validateFile`) to reject it
|
|
69
74
|
* with a specific reason rather than the generic 'unreadable'.
|
|
@@ -93,9 +98,9 @@ export interface AssistantAttachment {
|
|
|
93
98
|
* parts; see `MAX_TURN_BODY_BYTES`. Images only; never persisted.
|
|
94
99
|
*/
|
|
95
100
|
inlineDataUrl?: string;
|
|
96
|
-
/** wspace-files-svc id, once the
|
|
101
|
+
/** wspace-files-svc id, once Send has saved the file (`commitAttachments`). Absent on a draft. */
|
|
97
102
|
fileId?: string;
|
|
98
|
-
/** Short-lived presigned URL,
|
|
103
|
+
/** Short-lived presigned URL, minted when Send saves the file (see `urlResolvedAt`). */
|
|
99
104
|
downloadUrl?: string;
|
|
100
105
|
/**
|
|
101
106
|
* Inlined content for this attachment, already truncated to the per-file
|
|
@@ -124,16 +129,32 @@ export interface AssistantAttachment {
|
|
|
124
129
|
/** Human-readable failure reason when `status === 'error'`. */
|
|
125
130
|
error?: string;
|
|
126
131
|
/**
|
|
127
|
-
*
|
|
128
|
-
* is
|
|
129
|
-
*
|
|
130
|
-
* wspace-files-svc runs at minReplicas 0 and needs >=51s to bind its port against
|
|
131
|
-
* the gateway's 15s budget, so the first attachment after a quiet period
|
|
132
|
-
* legitimately sits for about a minute while fe-libs walks its retry ladder. A
|
|
133
|
-
* spinner alone reads as a hang. Draft-only, and NEVER a failure: `status` is still
|
|
134
|
-
* `uploading` and `error` is still unset.
|
|
132
|
+
* A short note on a save that is taking a while, shown on the chip while `uploading`.
|
|
133
|
+
* Draft-only, and NEVER a failure: `status` is still `uploading` and `error` is still unset.
|
|
134
|
+
* (The Azure-era "file service is starting up" ladder is gone from the Send path.)
|
|
135
135
|
*/
|
|
136
136
|
progressNote?: string;
|
|
137
|
+
/**
|
|
138
|
+
* 0-100 while Send is saving this attachment to Files (`commitAttachments`). Draft-only;
|
|
139
|
+
* cleared again as soon as the save settles either way.
|
|
140
|
+
*/
|
|
141
|
+
progress?: number;
|
|
142
|
+
/**
|
|
143
|
+
* When `downloadUrl` was minted (epoch ms). The URL is minted at Send, seconds before the
|
|
144
|
+
* turn; a Retry that replays the attachment much later refreshes it once it is old.
|
|
145
|
+
*/
|
|
146
|
+
urlResolvedAt?: number;
|
|
147
|
+
/**
|
|
148
|
+
* Why the last Send could not save this attachment to Files. The chip stays `ready` and the
|
|
149
|
+
* person can press Send again (that is the retry) or remove it. Draft-only.
|
|
150
|
+
*/
|
|
151
|
+
saveError?: string;
|
|
152
|
+
/**
|
|
153
|
+
* True for a file that is deliberately NOT saved to Files (a non-image over the 5 MiB direct
|
|
154
|
+
* upload limit whose text is still sent inline). `commitAttachments` passes it through
|
|
155
|
+
* untouched and a missing `fileId` on it is not a failure.
|
|
156
|
+
*/
|
|
157
|
+
inlineOnly?: boolean;
|
|
137
158
|
}
|
|
138
159
|
/**
|
|
139
160
|
* The slice of an attachment that is safe to keep on a sent message.
|
|
@@ -203,14 +224,13 @@ export declare function hasAttachmentWorkInFlight(preparingCount: number, attach
|
|
|
203
224
|
* model receives cannot drift apart by one of them being updated and the others
|
|
204
225
|
* not.
|
|
205
226
|
*
|
|
206
|
-
* `status` is the whole test, and that is deliberate rather than lazy
|
|
207
|
-
* attachment
|
|
208
|
-
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
* the
|
|
212
|
-
*
|
|
213
|
-
* and those are exactly the ones worth stopping a turn for.
|
|
227
|
+
* `status` is the whole test, and that is deliberate rather than lazy. A draft
|
|
228
|
+
* attachment is `ready` as soon as it is prepared (read, downscaled, extracted)
|
|
229
|
+
* and stays `ready` through a failed Send (the chip then carries `saveError`):
|
|
230
|
+
* what blocks a Send is the Send itself failing to save the file, not this
|
|
231
|
+
* filter. It exists so the set the person sees, the set the prompt describes
|
|
232
|
+
* and the set a spoken turn carries cannot drift apart. `error` is no longer
|
|
233
|
+
* produced for a draft (a file that cannot be read is refused at attach).
|
|
214
234
|
*/
|
|
215
235
|
export declare function getSendableAttachments(attachments: AssistantAttachment[]): AssistantAttachment[];
|
|
216
236
|
/** Why a draft cannot be sent yet, as far as its attachments are concerned. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/attachments.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../src/shared/assistant/attachments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAIH,OAAO,EAKL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACpB,MAAM,gBAAgB,CAAC;AAExB,eAAO,MAAM,eAAe,IAAI,CAAC;AAEjC,kFAAkF;AAClF,eAAO,MA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