@opentiny/tiny-robot 0.5.0 → 0.5.1-alpha.14

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/index.js CHANGED
@@ -1,31 +1,34 @@
1
- import S from "./attachments/index.js";
2
- import { B as F, a as b, b as x } from "./index6.js";
3
- import { c as Pe, d as Ae, u as Oe, e as Me, f as je, g as He, h as Re, i as We, j as $e, k as we } from "./index6.js";
4
- import E from "./container/index.js";
5
- import z from "./anchor/index.js";
6
- import C from "./conversations/index.js";
1
+ import x from "./attachments/index.js";
2
+ import { B, a as E, b as F } from "./index6.js";
3
+ import { c as je, d as He, u as $e, e as We, f as we, g as ke, h as Ne, i as Ve, j as Ge, k as Ie } from "./index6.js";
4
+ import b from "./container/index.js";
5
+ import C from "./anchor/index.js";
6
+ import z from "./conversations/index.js";
7
7
  import y from "./drag-overlay/index.js";
8
8
  import L from "./dropdown-menu/index.js";
9
9
  import P from "./feedback/index.js";
10
10
  import { H as A } from "./index7.js";
11
- import { u as Ne } from "./index7.js";
12
- import O from "./icon-button/index.js";
13
- import { Layout as M, LayoutProxyScrollbar as j, LayoutAsideToggle as H } from "./layout/index.js";
14
- import { Prompt as R, Prompts as W } from "./prompts/index.js";
15
- import $ from "./sender/index.js";
16
- import w from "./sender-compat/index.js";
17
- import k, { SuggestionPillButton as N } from "./suggestion-pills/index.js";
18
- import V from "./suggestion-popover/index.js";
11
+ import { u as Ke } from "./index7.js";
12
+ import M from "./icon-button/index.js";
13
+ import { Layout as O, LayoutProxyScrollbar as R, LayoutAsideToggle as j } from "./layout/index.js";
14
+ import H from "./model-selector/index.js";
15
+ import { Prompt as $, Prompts as W } from "./prompts/index.js";
16
+ import w from "./sender/index.js";
17
+ import k from "./sender-compat/index.js";
18
+ import N, { SuggestionPillButton as V } from "./suggestion-pills/index.js";
19
+ import G from "./suggestion-popover/index.js";
19
20
  import I from "./theme-provider/index.js";
20
- import { useTheme as Ie } from "./theme-provider/index.js";
21
+ import { useTheme as Ye } from "./theme-provider/index.js";
21
22
  import U from "./welcome/index.js";
22
23
  import K from "./mcp-server-picker/index.js";
23
24
  import X from "./mcp-add-form/index.js";
24
- import { A as Y, S as q, _ as G, W as J, D as Q } from "./index2.js";
25
- import { a as Ke, u as Xe } from "./index2.js";
26
- import { _ as Z, V as ee } from "./index3.js";
25
+ import { ExtensionCard as Y, ExtensionCardGrid as q } from "./extension-manager/index.js";
26
+ import { u as Je } from "./useSenderContentRegistration.js";
27
+ import { A as J, S as Q, _ as Z, W as ee, D as re } from "./index2.js";
28
+ import { a as Ze, u as er } from "./index2.js";
29
+ import { _ as oe, V as te } from "./index3.js";
27
30
  var u = /* @__PURE__ */ ((e) => (e.FileTypeNotAllowed = "file-type-not-allowed", e.FileSizeExceeded = "file-size-exceeded", e.FileCountExceeded = "file-count-exceeded", e))(u || {});
28
- function re(e, r) {
31
+ function ae(e, r) {
29
32
  if (!r) return !0;
30
33
  const t = r.split(",").map((o) => o.trim());
31
34
  return t.includes("*") ? !0 : t.some((o) => {
@@ -41,12 +44,12 @@ function re(e, r) {
41
44
  function v(e, r) {
42
45
  return e.size <= r;
43
46
  }
44
- function oe(e, r) {
47
+ function ne(e, r) {
45
48
  return e.length <= r;
46
49
  }
47
- function te(e, r) {
50
+ function se(e, r) {
48
51
  const { accept: t, multiple: o, maxSize: n, maxFiles: l } = r, a = [], s = [];
49
- if (!oe(e, l))
52
+ if (!ne(e, l))
50
53
  return {
51
54
  acceptedFiles: a,
52
55
  rejectedFiles: Array.from(e),
@@ -56,7 +59,7 @@ function te(e, r) {
56
59
  }
57
60
  };
58
61
  if (e.forEach((i) => {
59
- re(i, t) && v(i, n) ? a.push(i) : s.push(i);
62
+ ae(i, t) && v(i, n) ? a.push(i) : s.push(i);
60
63
  }), !o && a.length > 1)
61
64
  return {
62
65
  acceptedFiles: [],
@@ -87,7 +90,7 @@ function T(e) {
87
90
  disabled: e.disabled || !1
88
91
  };
89
92
  }
90
- const ze = {
93
+ const Ae = {
91
94
  /**
92
95
  * 挂载指令
93
96
  * @param el 元素
@@ -127,13 +130,13 @@ const ze = {
127
130
  a.preventDefault(), t = 0, n(!1, null);
128
131
  const s = (p = a.dataTransfer) == null ? void 0 : p.files, { onDrop: i, onError: d, accept: m, multiple: c, maxSize: g, maxFiles: D } = e.__vDropzoneOptions__;
129
132
  if (s && s.length > 0) {
130
- const h = Array.from(s), { acceptedFiles: f, rejectedFiles: B, rejectionReason: _ } = te(h, {
133
+ const h = Array.from(s), { acceptedFiles: f, rejectedFiles: S, rejectionReason: _ } = se(h, {
131
134
  accept: m,
132
135
  multiple: c,
133
136
  maxSize: g,
134
137
  maxFiles: D
135
138
  });
136
- _ && d({ files: B, ..._ }), f.length > 0 && i(f);
139
+ _ && d({ files: S, ..._ }), f.length > 0 && i(f);
137
140
  }
138
141
  }
139
142
  };
@@ -149,129 +152,139 @@ const ze = {
149
152
  unmounted(e) {
150
153
  e.__vDropzoneHandlers__ && (e.removeEventListener("dragenter", e.__vDropzoneHandlers__.handleDragEnter), e.removeEventListener("dragover", e.__vDropzoneHandlers__.handleDragOver), e.removeEventListener("dragleave", e.__vDropzoneHandlers__.handleDragLeave), e.removeEventListener("drop", e.__vDropzoneHandlers__.handleDrop), delete e.__vDropzoneHandlers__), delete e.__vDropzoneOptions__;
151
154
  }
152
- }, ae = [
153
- S,
154
- F,
155
- b,
155
+ }, ie = [
156
156
  x,
157
+ B,
157
158
  E,
158
- z,
159
+ F,
160
+ b,
159
161
  C,
162
+ z,
160
163
  y,
161
164
  L,
162
165
  P,
163
166
  A,
164
- O,
165
167
  M,
168
+ O,
169
+ R,
166
170
  j,
167
171
  H,
168
- R,
169
- W,
170
172
  $,
173
+ W,
171
174
  w,
172
175
  k,
173
176
  N,
174
177
  V,
178
+ G,
175
179
  I,
176
180
  U,
177
181
  K,
178
182
  X,
179
183
  Y,
180
184
  q,
181
- G,
185
+ J,
186
+ Q,
182
187
  Z,
188
+ oe,
189
+ te,
183
190
  ee,
184
- J,
185
- Q
186
- ], Ce = {
191
+ re
192
+ ], Me = {
187
193
  install(e) {
188
- ae.forEach((r) => {
194
+ ie.forEach((r) => {
189
195
  const t = r.name.replace(/^Tiny/, "").replace(/^Tr/, "");
190
196
  e.component(`Tr${t}`, r);
191
197
  });
192
198
  }
193
199
  };
194
200
  export {
195
- Y as ActionButton,
196
- z as Anchor,
197
- S as Attachments,
198
- F as Bubble,
199
- b as BubbleList,
200
- x as BubbleProvider,
201
- Pe as BubbleRendererMatchPriority,
202
- Ae as BubbleRenderers,
203
- G as ClearButton,
204
- E as Container,
205
- C as Conversations,
206
- Q as DefaultActionButtons,
201
+ J as ActionButton,
202
+ C as Anchor,
203
+ x as Attachments,
204
+ B as Bubble,
205
+ E as BubbleList,
206
+ F as BubbleProvider,
207
+ je as BubbleRendererMatchPriority,
208
+ He as BubbleRenderers,
209
+ Z as ClearButton,
210
+ b as Container,
211
+ z as Conversations,
212
+ re as DefaultActionButtons,
207
213
  y as DragOverlay,
208
214
  L as DropdownMenu,
215
+ Y as ExtensionCard,
216
+ q as ExtensionCardGrid,
209
217
  P as Feedback,
210
218
  A as History,
211
- O as IconButton,
212
- M as Layout,
213
- H as LayoutAsideToggle,
214
- j as LayoutProxyScrollbar,
219
+ M as IconButton,
220
+ O as Layout,
221
+ j as LayoutAsideToggle,
222
+ R as LayoutProxyScrollbar,
215
223
  X as McpAddForm,
216
224
  K as McpServerPicker,
217
- R as Prompt,
225
+ H as ModelSelector,
226
+ $ as Prompt,
218
227
  W as Prompts,
219
- Ke as SENDER_CONTEXT_KEY,
220
- $ as Sender,
221
- w as SenderCompat,
222
- q as SubmitButton,
223
- N as SuggestionPillButton,
224
- k as SuggestionPills,
225
- V as SuggestionPopover,
228
+ Ze as SENDER_CONTEXT_KEY,
229
+ w as Sender,
230
+ k as SenderCompat,
231
+ Q as SubmitButton,
232
+ V as SuggestionPillButton,
233
+ N as SuggestionPills,
234
+ G as SuggestionPopover,
226
235
  I as ThemeProvider,
227
- Y as TrActionButton,
228
- z as TrAnchor,
229
- S as TrAttachments,
230
- F as TrBubble,
231
- b as TrBubbleList,
232
- x as TrBubbleProvider,
233
- G as TrClearButton,
234
- E as TrContainer,
235
- C as TrConversations,
236
- Q as TrDefaultActionButtons,
236
+ J as TrActionButton,
237
+ C as TrAnchor,
238
+ x as TrAttachments,
239
+ B as TrBubble,
240
+ E as TrBubbleList,
241
+ F as TrBubbleProvider,
242
+ Z as TrClearButton,
243
+ b as TrContainer,
244
+ z as TrConversations,
245
+ re as TrDefaultActionButtons,
237
246
  y as TrDragOverlay,
238
247
  L as TrDropdownMenu,
248
+ Y as TrExtensionCard,
249
+ q as TrExtensionCardGrid,
239
250
  P as TrFeedback,
240
251
  A as TrHistory,
241
- O as TrIconButton,
242
- M as TrLayout,
243
- H as TrLayoutAsideToggle,
244
- j as TrLayoutProxyScrollbar,
252
+ M as TrIconButton,
253
+ O as TrLayout,
254
+ j as TrLayoutAsideToggle,
255
+ R as TrLayoutProxyScrollbar,
245
256
  X as TrMcpAddForm,
246
257
  K as TrMcpServerPicker,
247
- R as TrPrompt,
258
+ H as TrModelSelector,
259
+ $ as TrPrompt,
248
260
  W as TrPrompts,
249
- $ as TrSender,
250
- w as TrSenderCompat,
251
- q as TrSubmitButton,
252
- N as TrSuggestionPillButton,
253
- k as TrSuggestionPills,
254
- V as TrSuggestionPopover,
261
+ w as TrSender,
262
+ k as TrSenderCompat,
263
+ Q as TrSubmitButton,
264
+ V as TrSuggestionPillButton,
265
+ N as TrSuggestionPills,
266
+ G as TrSuggestionPopover,
255
267
  I as TrThemeProvider,
256
- Z as TrUploadButton,
257
- ee as TrVoiceButton,
268
+ oe as TrUploadButton,
269
+ te as TrVoiceButton,
258
270
  U as TrWelcome,
259
- J as TrWordCounter,
260
- Z as UploadButton,
261
- ee as VoiceButton,
271
+ ee as TrWordCounter,
272
+ oe as UploadButton,
273
+ te as VoiceButton,
262
274
  U as Welcome,
263
- J as WordCounter,
264
- Ce as default,
265
- Oe as useAutoScroll,
266
- Me as useBubbleBoxRenderer,
267
- je as useBubbleContentRenderer,
268
- He as useBubbleEventFn,
269
- Re as useBubbleStateChangeFn,
270
- We as useMessageContent,
271
- $e as useOmitMessageFields,
272
- Xe as useSenderContext,
273
- Ie as useTheme,
274
- we as useToolCall,
275
- Ne as useTouchDevice,
276
- ze as vDropzone
275
+ ee as WordCounter,
276
+ Me as default,
277
+ $e as useAutoScroll,
278
+ We as useBubbleBoxRenderer,
279
+ we as useBubbleContentRenderer,
280
+ ke as useBubbleEventFn,
281
+ Ne as useBubbleStateChangeFn,
282
+ Ve as useMessageContent,
283
+ Ge as useOmitMessageFields,
284
+ Je as useSenderContentRegistration,
285
+ er as useSenderContext,
286
+ Ye as useTheme,
287
+ Ie as useToolCall,
288
+ Ke as useTouchDevice,
289
+ Ae as vDropzone
277
290
  };
package/dist/index4.js CHANGED
@@ -814,7 +814,7 @@ function lt(e = {}) {
814
814
  return { width: r, height: s };
815
815
  }
816
816
  export {
817
- x as a,
817
+ rt as a,
818
818
  lt as b,
819
819
  tt as c,
820
820
  et as d,
@@ -831,6 +831,6 @@ export {
831
831
  Je as o,
832
832
  Ke as p,
833
833
  B as t,
834
- rt as u,
834
+ x as u,
835
835
  qe as w
836
836
  };