@frontera-sdk/chat-ui 1.50.59 → 1.50.60

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.
Files changed (42) hide show
  1. package/README.md +41 -12
  2. package/dist/agent-picker.js +4 -4
  3. package/dist/{esm-MHF25KDL.js → browser-B7HPFETX.js} +1 -1
  4. package/dist/browser-DK2ZWH4A.js +2081 -0
  5. package/dist/chat.d.ts +12 -8
  6. package/dist/chat.js +109 -50
  7. package/dist/{chunk-CWC2IOX7.js → chunk-26L3ST3H.js} +1147 -1787
  8. package/dist/{chunk-BEJ3HQG4.js → chunk-37G6MHWS.js} +12 -9
  9. package/dist/{chunk-ZS6PXIZP.js → chunk-BDJFVRYR.js} +16 -3
  10. package/dist/{chunk-PQZ2CS26.js → chunk-CDTES65T.js} +17 -41
  11. package/dist/{chunk-2KEBRV3W.js → chunk-F6PEZE7A.js} +1 -2
  12. package/dist/{chunk-IBCOQG5T.js → chunk-FDGBZFGN.js} +5 -4
  13. package/dist/{chunk-XSEN6ISU.js → chunk-FNIHHKOZ.js} +25 -8
  14. package/dist/{chunk-SZTQOXLD.js → chunk-IQXJEZM7.js} +14 -14
  15. package/dist/{chunk-AQGBRSIP.js → chunk-J7EWRXEC.js} +1 -1
  16. package/dist/{chunk-IHBTHNXV.js → chunk-KHF7OM3F.js} +2 -2
  17. package/dist/{chunk-VDZH5Z3K.js → chunk-PH7AYVSS.js} +2 -2
  18. package/dist/{chunk-GTQH7MPF.js → chunk-ROJM44GB.js} +1 -1
  19. package/dist/{chunk-76WUIIOX.js → chunk-S3ECTKA3.js} +2 -2
  20. package/dist/{chunk-FXKXDR5K.js → chunk-TSKFBMGC.js} +1 -1
  21. package/dist/{chunk-466MYFJD.js → chunk-UTKQ6G2A.js} +3 -3
  22. package/dist/{chunk-IQRPGFLI.js → chunk-V44YVBRX.js} +3 -35
  23. package/dist/chunk-WDYCLC4F.js +35 -0
  24. package/dist/chunk-XLX3L3P4.js +43 -0
  25. package/dist/client.js +3 -2
  26. package/dist/credential.js +2 -1
  27. package/dist/frame.js +2 -5
  28. package/dist/header.js +11 -11
  29. package/dist/message.js +11 -11
  30. package/dist/new-session.d.ts +128 -3
  31. package/dist/new-session.js +5 -5
  32. package/dist/parts.js +5 -5
  33. package/dist/{pdf-deck-view-inner-3PVGFH26.js → pdf-deck-view-inner-AY4FYDAJ.js} +4 -4
  34. package/dist/{pdf-document-view-inner-CP6VFHG4.js → pdf-document-view-inner-NC5MBN7X.js} +4 -4
  35. package/dist/pending-cards.js +5 -5
  36. package/dist/platform.css +88 -101
  37. package/dist/{univer-workbook-N5IIN7CH.js → univer-workbook-LSBVETAQ.js} +22824 -31017
  38. package/package.json +25 -5
  39. package/src/styles.css +20 -5
  40. package/dist/chunk-DGDHKMDB.js +0 -10
  41. package/dist/lib-3ZKX25RJ.js +0 -4511
  42. package/dist/new-session-Dw7JOgzu.d.ts +0 -141
@@ -1,4 +1,129 @@
1
- import 'react';
2
- export { D as DEFAULT_SHORTCUTS, N as NewSessionPrompt, a as NewSessionPromptProps, S as Shortcut, b as buildDefaultShortcuts } from './new-session-Dw7JOgzu.js';
3
- import './types-BDqLaBfH.js';
1
+ import * as react from 'react';
2
+ import { a as AgentAvatarConfig, A as AgentAvatarConfig$1 } from './types-BDqLaBfH.js';
4
3
  import 'zod';
4
+
5
+ /**
6
+ * Wire shapes the copied hooks reference but never inspect structurally.
7
+ *
8
+ * Left permissive on purpose: policing the service's internal payloads from
9
+ * here would mean mirroring them by hand and re-mirroring on every change,
10
+ * for types that only travel between copied files. The wire is the contract,
11
+ * and it is already agreed.
12
+ */
13
+ /**
14
+ * A model mode as the composer reads it.
15
+ *
16
+ * Mirrored structurally rather than left permissive: the composer maps this
17
+ * record into `ModeManifestEntry`, touching each field by name. The `model`
18
+ * binding the platform stores alongside is deliberately absent — an embedded
19
+ * chat has no business knowing which checkpoint the deployment runs.
20
+ */
21
+ /** Per-model reasoning capability, as the effort selector reads it. */
22
+ interface ReasoningConfig {
23
+ style: 'effort' | 'budget' | 'none';
24
+ supportedEfforts?: string[];
25
+ defaultEffort?: string;
26
+ defaultBudget?: number;
27
+ /** Reasoning cannot be disabled for this model. */
28
+ mandatory?: boolean;
29
+ }
30
+ /**
31
+ * Mirrored in full, unlike its permissive neighbours: the model selector reads
32
+ * these fields directly, so a `Record<string, unknown>` would type-error at
33
+ * every use rather than merely losing precision.
34
+ */
35
+ interface ModeManifestEntry {
36
+ key: string;
37
+ name?: string;
38
+ description?: string;
39
+ icon?: string;
40
+ style?: 'default' | 'premium' | 'accent';
41
+ thinking?: boolean;
42
+ modelId?: string;
43
+ /** Provider id (e.g. vertex, openrouter) — used for brand icon resolution. */
44
+ provider?: string;
45
+ /** API model id — alias of modelId for manifest clients. */
46
+ model?: string;
47
+ reasoning?: ReasoningConfig;
48
+ }
49
+ /**
50
+ * One agent as the manifest describes it.
51
+ *
52
+ * Mirrored from the service's `AgentManifestEntry`. The chat-scoped
53
+ * `/v1/chat-agents` answers a deliberately narrower projection of the same
54
+ * shape — no prompts, no model identifiers — so the copied selector reads it
55
+ * unchanged while an end-user token still sees only what it is allowed to.
56
+ */
57
+ interface AgentManifestEntry {
58
+ id: string;
59
+ name: string;
60
+ description?: string;
61
+ /** Orb seed; absent → the orb is derived from `name`. */
62
+ avatarSeed?: string | null;
63
+ avatarConfig?: AgentAvatarConfig;
64
+ modes: ModeManifestEntry[];
65
+ defaultMode: string;
66
+ }
67
+
68
+ interface NewSessionAgent extends AgentManifestEntry {
69
+ slug?: string;
70
+ kind?: "conversation" | "work";
71
+ workspaceId?: string;
72
+ features?: Record<string, boolean>;
73
+ }
74
+
75
+ /**
76
+ * What a conversation looks like before it has anything in it.
77
+ *
78
+ * The platform does not open on an empty scroll area — it asks a question and
79
+ * offers a few things the agent is good at. That matters more than it sounds:
80
+ * an empty chat box is a blank page, and the first thing most people do with a
81
+ * blank page is close it.
82
+ *
83
+ * Copy comes from the platform's own strings, so an embedded chat greets
84
+ * someone in the same words and the same language the product would.
85
+ */
86
+ interface Shortcut {
87
+ id: string;
88
+ label: string;
89
+ description: string;
90
+ /** Dropped into the composer, for the person to finish in their own words. */
91
+ prompt: string;
92
+ }
93
+ /** The platform's own shortcut set, in its order. */
94
+ declare const DEFAULT_SHORTCUTS: ReadonlyArray<Omit<Shortcut, 'label' | 'description' | 'prompt'>>;
95
+ /**
96
+ * The platform's four starter cards, translated.
97
+ *
98
+ * Exported rather than defaulted: a host whose agent can produce documents
99
+ * passes `shortcuts={buildDefaultShortcuts(t)}`, and one whose agent answers
100
+ * support questions passes its own — or none.
101
+ */
102
+ declare function buildDefaultShortcuts(translate: (key: string) => string): Shortcut[];
103
+ interface NewSessionPromptProps {
104
+ /** Shown in the greeting: "What should we work on with <agent>?" */
105
+ agentName?: string;
106
+ /**
107
+ * Makes the agent's name in the greeting a picker.
108
+ *
109
+ * This is where the platform puts agent selection — the name inside the
110
+ * headline, dotted-underlined — and `NewSessionGreeting` is its own
111
+ * component, copied. Omitted, the name renders locked: same orb, same type,
112
+ * without an affordance that would invite a click doing nothing.
113
+ */
114
+ switcher?: {
115
+ agents: NewSessionAgent[];
116
+ selectedAgent?: NewSessionAgent;
117
+ onSelect: (agentId: string) => void;
118
+ };
119
+ /** The agent's orb identity, so the greeting shows the same one as the thread. */
120
+ avatarConfig?: AgentAvatarConfig$1;
121
+ avatarSeed?: string | null;
122
+ /** Replace or extend the offered actions. */
123
+ shortcuts?: Shortcut[];
124
+ /** A card was chosen — put its prompt in the composer. */
125
+ onPick?: (shortcut: Shortcut) => void;
126
+ }
127
+ declare function NewSessionPrompt({ agentName, switcher, avatarConfig, avatarSeed, shortcuts, onPick, }: NewSessionPromptProps): react.JSX.Element;
128
+
129
+ export { DEFAULT_SHORTCUTS, NewSessionPrompt, type NewSessionPromptProps, type Shortcut, buildDefaultShortcuts };
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- export { DEFAULT_SHORTCUTS, NewSessionPrompt, buildDefaultShortcuts } from './chunk-466MYFJD.js';
3
- import './chunk-2KEBRV3W.js';
2
+ export { DEFAULT_SHORTCUTS, NewSessionPrompt, buildDefaultShortcuts } from './chunk-UTKQ6G2A.js';
3
+ import './chunk-F6PEZE7A.js';
4
4
  import './chunk-FTLVGUG5.js';
5
- import './chunk-IQRPGFLI.js';
5
+ import './chunk-V44YVBRX.js';
6
6
  import './chunk-IXDM5R55.js';
7
- import './chunk-FXKXDR5K.js';
8
- import './chunk-DGDHKMDB.js';
7
+ import './chunk-TSKFBMGC.js';
8
+ import './chunk-XLX3L3P4.js';
9
9
  import './chunk-AFVU5VT6.js';
10
10
  import './chunk-PR4QN5HX.js';
package/dist/parts.js CHANGED
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- import { ToolCallItem } from './chunk-76WUIIOX.js';
3
- import './chunk-IBCOQG5T.js';
4
- import './chunk-GTQH7MPF.js';
5
- import './chunk-IQRPGFLI.js';
6
- import './chunk-DGDHKMDB.js';
2
+ import { ToolCallItem } from './chunk-S3ECTKA3.js';
3
+ import './chunk-FDGBZFGN.js';
4
+ import './chunk-ROJM44GB.js';
5
+ import './chunk-V44YVBRX.js';
6
+ import './chunk-XLX3L3P4.js';
7
7
  import './chunk-AFVU5VT6.js';
8
8
  import './chunk-PR4QN5HX.js';
9
9
  import { createContext, useContext } from 'react';
@@ -1,11 +1,11 @@
1
1
  'use client';
2
2
  import { DeckNotesCard, deckOwnsArrowKeys } from './chunk-WMN6BPPS.js';
3
- import { resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb, ArtifactSkeleton } from './chunk-AQGBRSIP.js';
3
+ import { resolveStageWidth, zoomPercent, DECK_ZOOM_LEVELS, LazyThumb, ArtifactSkeleton } from './chunk-J7EWRXEC.js';
4
4
  import { useTranslation } from './chunk-FTLVGUG5.js';
5
- import { Button, ScrollArea } from './chunk-GTQH7MPF.js';
5
+ import { Button, ScrollArea } from './chunk-ROJM44GB.js';
6
6
  import { useIsMobile } from './chunk-IXDM5R55.js';
7
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from './chunk-ZS6PXIZP.js';
8
- import { cn } from './chunk-DGDHKMDB.js';
7
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from './chunk-BDJFVRYR.js';
8
+ import { cn } from './chunk-XLX3L3P4.js';
9
9
  import { ChevronDownMediumIcon, ChevronLeftIcon, ChevronRightIcon } from './chunk-AFVU5VT6.js';
10
10
  import './chunk-PR4QN5HX.js';
11
11
  import { useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
@@ -1,10 +1,10 @@
1
1
  'use client';
2
- import { zoomPercent, DECK_ZOOM_LEVELS, ArtifactSkeleton, LazyThumb } from './chunk-AQGBRSIP.js';
2
+ import { zoomPercent, DECK_ZOOM_LEVELS, ArtifactSkeleton, LazyThumb } from './chunk-J7EWRXEC.js';
3
3
  import { useTranslation } from './chunk-FTLVGUG5.js';
4
- import { Button, ScrollArea } from './chunk-GTQH7MPF.js';
4
+ import { Button, ScrollArea } from './chunk-ROJM44GB.js';
5
5
  import { useIsMobile } from './chunk-IXDM5R55.js';
6
- import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem } from './chunk-ZS6PXIZP.js';
7
- import { cn } from './chunk-DGDHKMDB.js';
6
+ import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem } from './chunk-BDJFVRYR.js';
7
+ import { cn } from './chunk-XLX3L3P4.js';
8
8
  import { ChevronLeftIcon, ChevronRightIcon, ChevronDownMediumIcon } from './chunk-AFVU5VT6.js';
9
9
  import './chunk-PR4QN5HX.js';
10
10
  import { memo, useState, useRef, useEffect, useCallback, useLayoutEffect } from 'react';
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- export { PendingCards } from './chunk-IHBTHNXV.js';
3
- import './chunk-IBCOQG5T.js';
4
- import './chunk-GTQH7MPF.js';
5
- import './chunk-IQRPGFLI.js';
6
- import './chunk-DGDHKMDB.js';
2
+ export { PendingCards } from './chunk-KHF7OM3F.js';
3
+ import './chunk-FDGBZFGN.js';
4
+ import './chunk-ROJM44GB.js';
5
+ import './chunk-V44YVBRX.js';
6
+ import './chunk-XLX3L3P4.js';
7
7
  import './chunk-AFVU5VT6.js';
8
8
  import './chunk-7ADM3CKD.js';
9
9
  import './chunk-PR4QN5HX.js';