@dudko.dev/agent-web-ui 0.0.1 → 0.0.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/README.md +66 -1
- package/dist/{chunk-4EHUITGU.js → chunk-SVYHDLAZ.js} +7 -1
- package/dist/{chunk-4EHUITGU.js.map → chunk-SVYHDLAZ.js.map} +1 -1
- package/dist/{chunk-A55Q377T.js → chunk-VCR7LU7J.js} +7 -1
- package/dist/{chunk-A55Q377T.js.map → chunk-VCR7LU7J.js.map} +1 -1
- package/dist/{chunk-P2F2P3JC.js → chunk-WFM6B7CL.js} +7 -1
- package/dist/{chunk-P2F2P3JC.js.map → chunk-WFM6B7CL.js.map} +1 -1
- package/dist/{chunk-TPK25QGK.js → chunk-WZ7K7JIP.js} +7 -1
- package/dist/{chunk-TPK25QGK.js.map → chunk-WZ7K7JIP.js.map} +1 -1
- package/dist/chunk-ZBHESK6V.js +1440 -0
- package/dist/chunk-ZBHESK6V.js.map +1 -0
- package/dist/controller.cjs +1891 -0
- package/dist/controller.cjs.map +1 -0
- package/dist/controller.d.cts +253 -0
- package/dist/controller.d.ts +253 -0
- package/dist/controller.js +482 -0
- package/dist/controller.js.map +1 -0
- package/dist/{en-CcNUz2tN.d.cts → en-Dg2MtzcJ.d.cts} +6 -0
- package/dist/{en-CcNUz2tN.d.ts → en-Dg2MtzcJ.d.ts} +6 -0
- package/dist/index.cjs +133 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +82 -4
- package/dist/index.d.ts +82 -4
- package/dist/index.js +142 -1419
- package/dist/index.js.map +1 -1
- package/dist/{labels-UuWI7wPo.d.ts → labels-CmiTBLWD.d.cts} +68 -100
- package/dist/{labels-D5BrHct4.d.cts → labels-DH1ESUtm.d.ts} +68 -100
- package/dist/locales/be.cjs +12 -0
- package/dist/locales/be.cjs.map +1 -1
- package/dist/locales/be.d.cts +4 -2
- package/dist/locales/be.d.ts +4 -2
- package/dist/locales/be.js +7 -1
- package/dist/locales/be.js.map +1 -1
- package/dist/locales/bg.cjs +12 -0
- package/dist/locales/bg.cjs.map +1 -1
- package/dist/locales/bg.d.cts +4 -2
- package/dist/locales/bg.d.ts +4 -2
- package/dist/locales/bg.js +7 -1
- package/dist/locales/bg.js.map +1 -1
- package/dist/locales/ca.cjs +12 -0
- package/dist/locales/ca.cjs.map +1 -1
- package/dist/locales/ca.d.cts +4 -2
- package/dist/locales/ca.d.ts +4 -2
- package/dist/locales/ca.js +7 -1
- package/dist/locales/ca.js.map +1 -1
- package/dist/locales/cs.cjs +12 -0
- package/dist/locales/cs.cjs.map +1 -1
- package/dist/locales/cs.d.cts +4 -2
- package/dist/locales/cs.d.ts +4 -2
- package/dist/locales/cs.js +7 -1
- package/dist/locales/cs.js.map +1 -1
- package/dist/locales/da.cjs +12 -0
- package/dist/locales/da.cjs.map +1 -1
- package/dist/locales/da.d.cts +4 -2
- package/dist/locales/da.d.ts +4 -2
- package/dist/locales/da.js +7 -1
- package/dist/locales/da.js.map +1 -1
- package/dist/locales/de.cjs +12 -0
- package/dist/locales/de.cjs.map +1 -1
- package/dist/locales/de.d.cts +4 -2
- package/dist/locales/de.d.ts +4 -2
- package/dist/locales/de.js +7 -1
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/el.cjs +12 -0
- package/dist/locales/el.cjs.map +1 -1
- package/dist/locales/el.d.cts +4 -2
- package/dist/locales/el.d.ts +4 -2
- package/dist/locales/el.js +7 -1
- package/dist/locales/el.js.map +1 -1
- package/dist/locales/en.cjs +12 -0
- package/dist/locales/en.cjs.map +1 -1
- package/dist/locales/en.d.cts +4 -2
- package/dist/locales/en.d.ts +4 -2
- package/dist/locales/en.js +7 -1
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es-419.cjs +16 -1
- package/dist/locales/es-419.cjs.map +1 -1
- package/dist/locales/es-419.d.cts +4 -2
- package/dist/locales/es-419.d.ts +4 -2
- package/dist/locales/es-419.js +6 -3
- package/dist/locales/es-419.js.map +1 -1
- package/dist/locales/es.cjs +12 -0
- package/dist/locales/es.cjs.map +1 -1
- package/dist/locales/es.d.cts +4 -2
- package/dist/locales/es.d.ts +4 -2
- package/dist/locales/es.js +2 -2
- package/dist/locales/fi.cjs +12 -0
- package/dist/locales/fi.cjs.map +1 -1
- package/dist/locales/fi.d.cts +4 -2
- package/dist/locales/fi.d.ts +4 -2
- package/dist/locales/fi.js +7 -1
- package/dist/locales/fi.js.map +1 -1
- package/dist/locales/fr-CA.cjs +12 -0
- package/dist/locales/fr-CA.cjs.map +1 -1
- package/dist/locales/fr-CA.d.cts +4 -2
- package/dist/locales/fr-CA.d.ts +4 -2
- package/dist/locales/fr-CA.js +2 -2
- package/dist/locales/fr.cjs +12 -0
- package/dist/locales/fr.cjs.map +1 -1
- package/dist/locales/fr.d.cts +4 -2
- package/dist/locales/fr.d.ts +4 -2
- package/dist/locales/fr.js +2 -2
- package/dist/locales/gn.cjs +12 -0
- package/dist/locales/gn.cjs.map +1 -1
- package/dist/locales/gn.d.cts +4 -2
- package/dist/locales/gn.d.ts +4 -2
- package/dist/locales/gn.js +7 -1
- package/dist/locales/gn.js.map +1 -1
- package/dist/locales/hr.cjs +12 -0
- package/dist/locales/hr.cjs.map +1 -1
- package/dist/locales/hr.d.cts +4 -2
- package/dist/locales/hr.d.ts +4 -2
- package/dist/locales/hr.js +7 -1
- package/dist/locales/hr.js.map +1 -1
- package/dist/locales/ht.cjs +12 -0
- package/dist/locales/ht.cjs.map +1 -1
- package/dist/locales/ht.d.cts +4 -2
- package/dist/locales/ht.d.ts +4 -2
- package/dist/locales/ht.js +7 -1
- package/dist/locales/ht.js.map +1 -1
- package/dist/locales/hu.cjs +12 -0
- package/dist/locales/hu.cjs.map +1 -1
- package/dist/locales/hu.d.cts +4 -2
- package/dist/locales/hu.d.ts +4 -2
- package/dist/locales/hu.js +7 -1
- package/dist/locales/hu.js.map +1 -1
- package/dist/locales/index.cjs +6 -0
- package/dist/locales/index.cjs.map +1 -1
- package/dist/locales/index.d.cts +6 -4
- package/dist/locales/index.d.ts +6 -4
- package/dist/locales/index.js +1 -1
- package/dist/locales/it.cjs +12 -0
- package/dist/locales/it.cjs.map +1 -1
- package/dist/locales/it.d.cts +4 -2
- package/dist/locales/it.d.ts +4 -2
- package/dist/locales/it.js +7 -1
- package/dist/locales/it.js.map +1 -1
- package/dist/locales/nb.cjs +12 -0
- package/dist/locales/nb.cjs.map +1 -1
- package/dist/locales/nb.d.cts +4 -2
- package/dist/locales/nb.d.ts +4 -2
- package/dist/locales/nb.js +7 -1
- package/dist/locales/nb.js.map +1 -1
- package/dist/locales/nl.cjs +12 -0
- package/dist/locales/nl.cjs.map +1 -1
- package/dist/locales/nl.d.cts +4 -2
- package/dist/locales/nl.d.ts +4 -2
- package/dist/locales/nl.js +7 -1
- package/dist/locales/nl.js.map +1 -1
- package/dist/locales/pl.cjs +12 -0
- package/dist/locales/pl.cjs.map +1 -1
- package/dist/locales/pl.d.cts +4 -2
- package/dist/locales/pl.d.ts +4 -2
- package/dist/locales/pl.js +7 -1
- package/dist/locales/pl.js.map +1 -1
- package/dist/locales/pt-BR.cjs +12 -0
- package/dist/locales/pt-BR.cjs.map +1 -1
- package/dist/locales/pt-BR.d.cts +4 -2
- package/dist/locales/pt-BR.d.ts +4 -2
- package/dist/locales/pt-BR.js +7 -1
- package/dist/locales/pt-BR.js.map +1 -1
- package/dist/locales/pt.cjs +12 -0
- package/dist/locales/pt.cjs.map +1 -1
- package/dist/locales/pt.d.cts +4 -2
- package/dist/locales/pt.d.ts +4 -2
- package/dist/locales/pt.js +7 -1
- package/dist/locales/pt.js.map +1 -1
- package/dist/locales/qu.cjs +12 -0
- package/dist/locales/qu.cjs.map +1 -1
- package/dist/locales/qu.d.cts +4 -2
- package/dist/locales/qu.d.ts +4 -2
- package/dist/locales/qu.js +7 -1
- package/dist/locales/qu.js.map +1 -1
- package/dist/locales/ro.cjs +12 -0
- package/dist/locales/ro.cjs.map +1 -1
- package/dist/locales/ro.d.cts +4 -2
- package/dist/locales/ro.d.ts +4 -2
- package/dist/locales/ro.js +7 -1
- package/dist/locales/ro.js.map +1 -1
- package/dist/locales/ru.cjs +12 -0
- package/dist/locales/ru.cjs.map +1 -1
- package/dist/locales/ru.d.cts +4 -2
- package/dist/locales/ru.d.ts +4 -2
- package/dist/locales/ru.js +7 -1
- package/dist/locales/ru.js.map +1 -1
- package/dist/locales/sk.cjs +12 -0
- package/dist/locales/sk.cjs.map +1 -1
- package/dist/locales/sk.d.cts +4 -2
- package/dist/locales/sk.d.ts +4 -2
- package/dist/locales/sk.js +7 -1
- package/dist/locales/sk.js.map +1 -1
- package/dist/locales/sq.cjs +12 -0
- package/dist/locales/sq.cjs.map +1 -1
- package/dist/locales/sq.d.cts +4 -2
- package/dist/locales/sq.d.ts +4 -2
- package/dist/locales/sq.js +7 -1
- package/dist/locales/sq.js.map +1 -1
- package/dist/locales/sr-Latn.cjs +12 -0
- package/dist/locales/sr-Latn.cjs.map +1 -1
- package/dist/locales/sr-Latn.d.cts +4 -2
- package/dist/locales/sr-Latn.d.ts +4 -2
- package/dist/locales/sr-Latn.js +2 -2
- package/dist/locales/sr.cjs +12 -0
- package/dist/locales/sr.cjs.map +1 -1
- package/dist/locales/sr.d.cts +4 -2
- package/dist/locales/sr.d.ts +4 -2
- package/dist/locales/sr.js +2 -2
- package/dist/locales/sv.cjs +12 -0
- package/dist/locales/sv.cjs.map +1 -1
- package/dist/locales/sv.d.cts +4 -2
- package/dist/locales/sv.d.ts +4 -2
- package/dist/locales/sv.js +7 -1
- package/dist/locales/sv.js.map +1 -1
- package/dist/locales/tr.cjs +12 -0
- package/dist/locales/tr.cjs.map +1 -1
- package/dist/locales/tr.d.cts +4 -2
- package/dist/locales/tr.d.ts +4 -2
- package/dist/locales/tr.js +7 -1
- package/dist/locales/tr.js.map +1 -1
- package/dist/locales/uk.cjs +12 -0
- package/dist/locales/uk.cjs.map +1 -1
- package/dist/locales/uk.d.cts +4 -2
- package/dist/locales/uk.d.ts +4 -2
- package/dist/locales/uk.js +7 -1
- package/dist/locales/uk.js.map +1 -1
- package/dist/mcp-app.d.cts +491 -3
- package/dist/mcp-app.d.ts +491 -3
- package/dist/questions-Dw--IEjT.d.cts +100 -0
- package/dist/questions-Dw--IEjT.d.ts +100 -0
- package/dist/{types-BmvgYUzF.d.cts → types-CQquuZpl.d.cts} +1 -1
- package/dist/{types-Cr5gmUts.d.ts → types-CXZfZVP5.d.ts} +1 -1
- package/dist/{mcp-app-entry-BA-Ca39z.d.ts → types-DnBCok3z.d.cts} +2 -488
- package/dist/{mcp-app-entry-tybABaHg.d.cts → types-DnBCok3z.d.ts} +2 -488
- package/package.json +13 -3
package/dist/index.cjs
CHANGED
|
@@ -51,6 +51,7 @@ __export(src_exports, {
|
|
|
51
51
|
RECORDING_DEFAULT_MAX_MS: () => RECORDING_DEFAULT_MAX_MS,
|
|
52
52
|
RECORDING_TYPES: () => RECORDING_TYPES,
|
|
53
53
|
SpeechOutputError: () => SpeechOutputError,
|
|
54
|
+
activeElementOf: () => activeElementOf,
|
|
54
55
|
agentStateReducer: () => agentStateReducer,
|
|
55
56
|
agentStatusOf: () => agentStatusOf,
|
|
56
57
|
askUserOutputKept: () => askUserOutputKept,
|
|
@@ -69,6 +70,7 @@ __export(src_exports, {
|
|
|
69
70
|
chatTitle: () => chatTitle,
|
|
70
71
|
clampFrameHeight: () => clampFrameHeight,
|
|
71
72
|
coalesce: () => coalesce,
|
|
73
|
+
composedContains: () => composedContains,
|
|
72
74
|
createApprovalQueue: () => createApprovalQueue,
|
|
73
75
|
createAudioSpeaker: () => createAudioSpeaker,
|
|
74
76
|
createBrowserSpeaker: () => createBrowserSpeaker,
|
|
@@ -79,6 +81,8 @@ __export(src_exports, {
|
|
|
79
81
|
createRecordingRecognizer: () => createRecordingRecognizer,
|
|
80
82
|
cspMetaTag: () => cspMetaTag,
|
|
81
83
|
dataUrlParts: () => dataUrlParts,
|
|
84
|
+
deepActiveElement: () => deepActiveElement,
|
|
85
|
+
deepElementFromPoint: () => deepElementFromPoint,
|
|
82
86
|
defaultLabels: () => defaultLabels,
|
|
83
87
|
defaultNoticeTexts: () => defaultNoticeTexts,
|
|
84
88
|
downscaleImage: () => downscaleImage,
|
|
@@ -92,6 +96,7 @@ __export(src_exports, {
|
|
|
92
96
|
endGap: () => endGap,
|
|
93
97
|
errMessage: () => errMessage,
|
|
94
98
|
escapeAttribute: () => escapeAttribute,
|
|
99
|
+
eventTargetOf: () => eventTargetOf,
|
|
95
100
|
excerptNote: () => excerptNote,
|
|
96
101
|
fileKindOf: () => fileKindOf,
|
|
97
102
|
fileNameOf: () => fileNameOf,
|
|
@@ -110,11 +115,14 @@ __export(src_exports, {
|
|
|
110
115
|
imagesInOutput: () => imagesInOutput,
|
|
111
116
|
inputCounterShown: () => inputCounterShown,
|
|
112
117
|
insertionFits: () => insertionFits,
|
|
118
|
+
isEventInside: () => isEventInside,
|
|
113
119
|
isOneCharacter: () => isOneCharacter,
|
|
120
|
+
isShadowRoot: () => isShadowRoot,
|
|
114
121
|
languageOfText: () => languageOfText,
|
|
115
122
|
lessonsOf: () => lessonsOf,
|
|
116
123
|
lineCountOf: () => lineCountOf,
|
|
117
124
|
linkedFilesOf: () => linkedFilesOf,
|
|
125
|
+
listenScrollAround: () => listenScrollAround,
|
|
118
126
|
listenToOtherTabs: () => listenToOtherTabs,
|
|
119
127
|
longTextName: () => longTextName,
|
|
120
128
|
longTextRoute: () => longTextRoute,
|
|
@@ -127,6 +135,9 @@ __export(src_exports, {
|
|
|
127
135
|
micProblemText: () => micProblemText,
|
|
128
136
|
namedFilesOf: () => namedFilesOf,
|
|
129
137
|
newChatId: () => newChatId,
|
|
138
|
+
notReadyIntent: () => notReadyIntent,
|
|
139
|
+
notReadyReason: () => notReadyReason,
|
|
140
|
+
nothingFocused: () => nothingFocused,
|
|
130
141
|
noticesOf: () => noticesOf,
|
|
131
142
|
overflowOf: () => overflowOf,
|
|
132
143
|
ownUnsaved: () => ownUnsaved,
|
|
@@ -134,18 +145,21 @@ __export(src_exports, {
|
|
|
134
145
|
pathsNamedIn: () => pathsNamedIn,
|
|
135
146
|
pendingApprovalsOf: () => pendingApprovalsOf,
|
|
136
147
|
pickRecordingType: () => pickRecordingType,
|
|
148
|
+
portalHostOf: () => portalHostOf,
|
|
137
149
|
previewValue: () => previewValue,
|
|
138
150
|
questionChoiceOf: () => questionChoiceOf,
|
|
139
151
|
questionOtherOf: () => questionOtherOf,
|
|
140
152
|
questionTimeoutOf: () => questionTimeoutOf,
|
|
141
153
|
recordingSupported: () => recordingSupported,
|
|
142
154
|
remoteAnswerOf: () => remoteAnswerOf,
|
|
155
|
+
rootOf: () => rootOf,
|
|
143
156
|
sandboxTokens: () => sandboxTokens,
|
|
144
157
|
sandboxedCsp: () => sandboxedCsp,
|
|
145
158
|
saveAttachments: () => saveAttachments,
|
|
146
159
|
saveChat: () => saveChat,
|
|
147
160
|
scriptOfLanguage: () => scriptOfLanguage,
|
|
148
161
|
scriptOfText: () => scriptOfText,
|
|
162
|
+
shadowRootsAround: () => shadowRootsAround,
|
|
149
163
|
speakableText: () => speakableText,
|
|
150
164
|
speechSynthesisSupported: () => speechSynthesisSupported,
|
|
151
165
|
splitForSpeech: () => splitForSpeech,
|
|
@@ -159,6 +173,7 @@ __export(src_exports, {
|
|
|
159
173
|
voiceFor: () => voiceFor,
|
|
160
174
|
voiceMessageName: () => voiceMessageName,
|
|
161
175
|
voicesOf: () => voicesOf,
|
|
176
|
+
waitingSendStep: () => waitingSendStep,
|
|
162
177
|
webSearchOf: () => webSearchOf,
|
|
163
178
|
withAttachments: () => withAttachments,
|
|
164
179
|
withCspFirst: () => withCspFirst,
|
|
@@ -1527,6 +1542,21 @@ var steerIntent = (input) => {
|
|
|
1527
1542
|
if (parseSlash(input.raw)) return "ignore";
|
|
1528
1543
|
return input.hasAttachments ? "attachments" : "steer";
|
|
1529
1544
|
};
|
|
1545
|
+
var notReadyIntent = (input) => {
|
|
1546
|
+
if (!input.hasContent) return "ignore";
|
|
1547
|
+
if (input.disabled) return "refuse";
|
|
1548
|
+
if (input.ready) return "send";
|
|
1549
|
+
if (input.status === "initializing") return "wait";
|
|
1550
|
+
return "refuse";
|
|
1551
|
+
};
|
|
1552
|
+
var notReadyReason = (input) => input.disabled ? "disabled" : input.status === "error" ? "failed" : "unavailable";
|
|
1553
|
+
var waitingSendStep = (input) => {
|
|
1554
|
+
if (input.disabled) return "stop";
|
|
1555
|
+
if (input.ready) return "send";
|
|
1556
|
+
if (input.status === "initializing" || input.status === "running") return "wait";
|
|
1557
|
+
if (input.status === "error") return "failed";
|
|
1558
|
+
return "stop";
|
|
1559
|
+
};
|
|
1530
1560
|
var filterCommands = (commands, query) => {
|
|
1531
1561
|
const q = query.toLowerCase();
|
|
1532
1562
|
if (!q) return commands;
|
|
@@ -1989,6 +2019,12 @@ var defaultLabels = {
|
|
|
1989
2019
|
placeholderBusy: "Tell the agent something while it works…",
|
|
1990
2020
|
steer: "Send to the agent",
|
|
1991
2021
|
noAttachmentsWhileBusy: "Files can’t be added while the agent is working — send them with your next message.",
|
|
2022
|
+
sendWhenReady: "Sends when the agent is ready",
|
|
2023
|
+
sendWhenReadyButton: "Send when the agent is ready",
|
|
2024
|
+
cancelSendWhenReady: "Don’t send",
|
|
2025
|
+
notSentFailed: "Not sent: the agent could not start. Your message is still here.",
|
|
2026
|
+
notSentUnavailable: "Not sent: the agent isn’t ready. Your message is still here.",
|
|
2027
|
+
notSentDisabled: "Not sent: sending is turned off. Your message is still here.",
|
|
1992
2028
|
queuedWaiting: "waiting for the agent’s next step",
|
|
1993
2029
|
queuedForSession: (heldBy) => heldBy === "this-tab" ? "waiting for the other run to finish" : "waiting for the other tab to finish",
|
|
1994
2030
|
queuedForOtherTab: "waiting for the other tab to pick it up",
|
|
@@ -2421,6 +2457,88 @@ var followsAfterScroll = (following, before, now) => {
|
|
|
2421
2457
|
};
|
|
2422
2458
|
var followsAfterResize = (following, before, now) => following && !(now.clientHeight === before.clientHeight && now.scrollHeight >= before.scrollHeight && now.scrollTop < reach(before) - FOLLOW_LEAVE_PX);
|
|
2423
2459
|
|
|
2460
|
+
// src/dom-root.ts
|
|
2461
|
+
var DOCUMENT_NODE = 9;
|
|
2462
|
+
var DOCUMENT_FRAGMENT_NODE = 11;
|
|
2463
|
+
var MAX_DEPTH = 64;
|
|
2464
|
+
var isShadowRoot = (node) => typeof node === "object" && node !== null && node.nodeType === DOCUMENT_FRAGMENT_NODE && "host" in node && Boolean(node.host);
|
|
2465
|
+
var isDocument = (node) => typeof node === "object" && node !== null && node.nodeType === DOCUMENT_NODE;
|
|
2466
|
+
var rootOf = (node) => {
|
|
2467
|
+
if (isDocument(node)) return node;
|
|
2468
|
+
const root = typeof node.getRootNode === "function" ? node.getRootNode() : void 0;
|
|
2469
|
+
if (isDocument(root) || isShadowRoot(root)) return root;
|
|
2470
|
+
return node.ownerDocument;
|
|
2471
|
+
};
|
|
2472
|
+
var activeElementOf = (at) => {
|
|
2473
|
+
const root = isDocument(at) || isShadowRoot(at) ? at : rootOf(at);
|
|
2474
|
+
return root.activeElement ?? null;
|
|
2475
|
+
};
|
|
2476
|
+
var deepActiveElement = (root) => {
|
|
2477
|
+
let active = root.activeElement ?? null;
|
|
2478
|
+
for (let i = 0; active && i < MAX_DEPTH; i++) {
|
|
2479
|
+
const inner = active.shadowRoot?.activeElement;
|
|
2480
|
+
if (!inner || inner === active) break;
|
|
2481
|
+
active = inner;
|
|
2482
|
+
}
|
|
2483
|
+
return active;
|
|
2484
|
+
};
|
|
2485
|
+
var nothingFocused = (doc) => {
|
|
2486
|
+
const active = doc.activeElement;
|
|
2487
|
+
return !active || active === doc.body;
|
|
2488
|
+
};
|
|
2489
|
+
var composedContains = (ancestor, node) => {
|
|
2490
|
+
let at = node;
|
|
2491
|
+
for (let i = 0; at && i < 1e5; i++) {
|
|
2492
|
+
if (at === ancestor) return true;
|
|
2493
|
+
at = at.parentNode ?? (isShadowRoot(at) ? at.host : null);
|
|
2494
|
+
}
|
|
2495
|
+
return false;
|
|
2496
|
+
};
|
|
2497
|
+
var pathOf = (event) => typeof event.composedPath === "function" ? event.composedPath() : [];
|
|
2498
|
+
var eventTargetOf = (event) => pathOf(event)[0] ?? event.target;
|
|
2499
|
+
var isEventInside = (event, node) => {
|
|
2500
|
+
if (!node) return false;
|
|
2501
|
+
const target = event.target;
|
|
2502
|
+
const path = pathOf(event);
|
|
2503
|
+
if (path.length > 0 && path[0] !== target) return path.includes(node);
|
|
2504
|
+
return typeof target?.nodeType === "number" && node.contains(target);
|
|
2505
|
+
};
|
|
2506
|
+
var deepElementFromPoint = (doc, x, y) => {
|
|
2507
|
+
if (typeof doc.elementFromPoint !== "function") return null;
|
|
2508
|
+
let hit = doc.elementFromPoint(x, y);
|
|
2509
|
+
for (let i = 0; hit && i < MAX_DEPTH; i++) {
|
|
2510
|
+
const shadow = hit.shadowRoot;
|
|
2511
|
+
if (!shadow || typeof shadow.elementFromPoint !== "function") break;
|
|
2512
|
+
const inner = shadow.elementFromPoint(x, y);
|
|
2513
|
+
if (!inner || inner === hit || !composedContains(shadow, inner)) break;
|
|
2514
|
+
hit = inner;
|
|
2515
|
+
}
|
|
2516
|
+
return hit;
|
|
2517
|
+
};
|
|
2518
|
+
var shadowRootsAround = (node) => {
|
|
2519
|
+
const roots = [];
|
|
2520
|
+
let root = rootOf(node);
|
|
2521
|
+
for (let i = 0; isShadowRoot(root) && i < MAX_DEPTH; i++) {
|
|
2522
|
+
roots.push(root);
|
|
2523
|
+
root = rootOf(root.host);
|
|
2524
|
+
}
|
|
2525
|
+
return roots;
|
|
2526
|
+
};
|
|
2527
|
+
var listenScrollAround = (node, listener) => {
|
|
2528
|
+
const view = node.ownerDocument?.defaultView ?? globalThis;
|
|
2529
|
+
const targets = [view, ...shadowRootsAround(node)];
|
|
2530
|
+
for (const t of targets) t.addEventListener("scroll", listener, true);
|
|
2531
|
+
return () => {
|
|
2532
|
+
for (const t of targets) t.removeEventListener("scroll", listener, true);
|
|
2533
|
+
};
|
|
2534
|
+
};
|
|
2535
|
+
var portalHostOf = (from, selector) => {
|
|
2536
|
+
const near = from.closest(selector);
|
|
2537
|
+
if (near) return near;
|
|
2538
|
+
const root = rootOf(from);
|
|
2539
|
+
return isShadowRoot(root) ? root : from.ownerDocument.body;
|
|
2540
|
+
};
|
|
2541
|
+
|
|
2424
2542
|
// src/file-kinds.ts
|
|
2425
2543
|
var import_agent_web2 = require("@dudko.dev/agent-web");
|
|
2426
2544
|
var CODE = /\.(?:js|mjs|cjs|jsx|ts|tsx|css|scss|py|rb|go|rs|java|kt|c|h|cpp|cs|php|sh|sql|xml|svg|yaml|yml|toml)$/i;
|
|
@@ -4025,6 +4143,7 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4025
4143
|
RECORDING_DEFAULT_MAX_MS,
|
|
4026
4144
|
RECORDING_TYPES,
|
|
4027
4145
|
SpeechOutputError,
|
|
4146
|
+
activeElementOf,
|
|
4028
4147
|
agentStateReducer,
|
|
4029
4148
|
agentStatusOf,
|
|
4030
4149
|
askUserOutputKept,
|
|
@@ -4043,6 +4162,7 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4043
4162
|
chatTitle,
|
|
4044
4163
|
clampFrameHeight,
|
|
4045
4164
|
coalesce,
|
|
4165
|
+
composedContains,
|
|
4046
4166
|
createApprovalQueue,
|
|
4047
4167
|
createAudioSpeaker,
|
|
4048
4168
|
createBrowserSpeaker,
|
|
@@ -4053,6 +4173,8 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4053
4173
|
createRecordingRecognizer,
|
|
4054
4174
|
cspMetaTag,
|
|
4055
4175
|
dataUrlParts,
|
|
4176
|
+
deepActiveElement,
|
|
4177
|
+
deepElementFromPoint,
|
|
4056
4178
|
defaultLabels,
|
|
4057
4179
|
defaultNoticeTexts,
|
|
4058
4180
|
downscaleImage,
|
|
@@ -4066,6 +4188,7 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4066
4188
|
endGap,
|
|
4067
4189
|
errMessage,
|
|
4068
4190
|
escapeAttribute,
|
|
4191
|
+
eventTargetOf,
|
|
4069
4192
|
excerptNote,
|
|
4070
4193
|
fileKindOf,
|
|
4071
4194
|
fileNameOf,
|
|
@@ -4084,11 +4207,14 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4084
4207
|
imagesInOutput,
|
|
4085
4208
|
inputCounterShown,
|
|
4086
4209
|
insertionFits,
|
|
4210
|
+
isEventInside,
|
|
4087
4211
|
isOneCharacter,
|
|
4212
|
+
isShadowRoot,
|
|
4088
4213
|
languageOfText,
|
|
4089
4214
|
lessonsOf,
|
|
4090
4215
|
lineCountOf,
|
|
4091
4216
|
linkedFilesOf,
|
|
4217
|
+
listenScrollAround,
|
|
4092
4218
|
listenToOtherTabs,
|
|
4093
4219
|
longTextName,
|
|
4094
4220
|
longTextRoute,
|
|
@@ -4101,6 +4227,9 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4101
4227
|
micProblemText,
|
|
4102
4228
|
namedFilesOf,
|
|
4103
4229
|
newChatId,
|
|
4230
|
+
notReadyIntent,
|
|
4231
|
+
notReadyReason,
|
|
4232
|
+
nothingFocused,
|
|
4104
4233
|
noticesOf,
|
|
4105
4234
|
overflowOf,
|
|
4106
4235
|
ownUnsaved,
|
|
@@ -4108,18 +4237,21 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4108
4237
|
pathsNamedIn,
|
|
4109
4238
|
pendingApprovalsOf,
|
|
4110
4239
|
pickRecordingType,
|
|
4240
|
+
portalHostOf,
|
|
4111
4241
|
previewValue,
|
|
4112
4242
|
questionChoiceOf,
|
|
4113
4243
|
questionOtherOf,
|
|
4114
4244
|
questionTimeoutOf,
|
|
4115
4245
|
recordingSupported,
|
|
4116
4246
|
remoteAnswerOf,
|
|
4247
|
+
rootOf,
|
|
4117
4248
|
sandboxTokens,
|
|
4118
4249
|
sandboxedCsp,
|
|
4119
4250
|
saveAttachments,
|
|
4120
4251
|
saveChat,
|
|
4121
4252
|
scriptOfLanguage,
|
|
4122
4253
|
scriptOfText,
|
|
4254
|
+
shadowRootsAround,
|
|
4123
4255
|
speakableText,
|
|
4124
4256
|
speechSynthesisSupported,
|
|
4125
4257
|
splitForSpeech,
|
|
@@ -4133,6 +4265,7 @@ var createAudioSpeaker = (options) => (text2, { lang, onState }) => {
|
|
|
4133
4265
|
voiceFor,
|
|
4134
4266
|
voiceMessageName,
|
|
4135
4267
|
voicesOf,
|
|
4268
|
+
waitingSendStep,
|
|
4136
4269
|
webSearchOf,
|
|
4137
4270
|
withAttachments,
|
|
4138
4271
|
withCspFirst,
|