@salmonui/chat 0.0.0-stage → 0.3.0

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +41 -2
  3. package/dist/conversation/Conversation.d.ts +4 -0
  4. package/dist/conversation/Conversation.d.ts.map +1 -0
  5. package/dist/conversation/Conversation.js +588 -0
  6. package/dist/conversation/Conversation.js.map +1 -0
  7. package/dist/conversation/Item.d.ts +67 -0
  8. package/dist/conversation/Item.d.ts.map +1 -0
  9. package/dist/conversation/Item.js +149 -0
  10. package/dist/conversation/Item.js.map +1 -0
  11. package/dist/conversation/assistant-lazy.d.ts +6 -0
  12. package/dist/conversation/assistant-lazy.d.ts.map +1 -0
  13. package/dist/conversation/assistant-lazy.js +16 -0
  14. package/dist/conversation/assistant-lazy.js.map +1 -0
  15. package/dist/conversation/assistant-static.d.ts +4 -0
  16. package/dist/conversation/assistant-static.d.ts.map +1 -0
  17. package/dist/conversation/assistant-static.js +9 -0
  18. package/dist/conversation/assistant-static.js.map +1 -0
  19. package/dist/conversation/assistant-types.d.ts +2 -0
  20. package/dist/conversation/assistant-types.d.ts.map +1 -0
  21. package/dist/conversation/assistant-types.js +3 -0
  22. package/dist/conversation/assistant-types.js.map +1 -0
  23. package/dist/conversation/assistant.d.ts +54 -0
  24. package/dist/conversation/assistant.d.ts.map +1 -0
  25. package/dist/conversation/assistant.js +348 -0
  26. package/dist/conversation/assistant.js.map +1 -0
  27. package/dist/conversation/context.d.ts +80 -0
  28. package/dist/conversation/context.d.ts.map +1 -0
  29. package/dist/conversation/context.js +40 -0
  30. package/dist/conversation/context.js.map +1 -0
  31. package/dist/conversation/format.d.ts +33 -0
  32. package/dist/conversation/format.d.ts.map +1 -0
  33. package/dist/conversation/format.js +150 -0
  34. package/dist/conversation/format.js.map +1 -0
  35. package/dist/conversation/parts.d.ts +16 -0
  36. package/dist/conversation/parts.d.ts.map +1 -0
  37. package/dist/conversation/parts.js +326 -0
  38. package/dist/conversation/parts.js.map +1 -0
  39. package/dist/conversation/runner.d.ts +15 -0
  40. package/dist/conversation/runner.d.ts.map +1 -0
  41. package/dist/conversation/runner.js +52 -0
  42. package/dist/conversation/runner.js.map +1 -0
  43. package/dist/conversation/store.d.ts +63 -0
  44. package/dist/conversation/store.d.ts.map +1 -0
  45. package/dist/conversation/store.js +142 -0
  46. package/dist/conversation/store.js.map +1 -0
  47. package/dist/conversation/types.d.ts +479 -0
  48. package/dist/conversation/types.d.ts.map +1 -0
  49. package/dist/conversation/types.js +5 -0
  50. package/dist/conversation/types.js.map +1 -0
  51. package/dist/conversation.css +788 -0
  52. package/dist/conversation.d.ts +18 -0
  53. package/dist/conversation.d.ts.map +1 -0
  54. package/dist/conversation.js +26 -0
  55. package/dist/conversation.js.map +1 -0
  56. package/dist/inline-assist/InlineAssist.d.ts +16 -0
  57. package/dist/inline-assist/InlineAssist.d.ts.map +1 -0
  58. package/dist/inline-assist/InlineAssist.js +384 -0
  59. package/dist/inline-assist/InlineAssist.js.map +1 -0
  60. package/dist/inline-assist/model.d.ts +40 -0
  61. package/dist/inline-assist/model.d.ts.map +1 -0
  62. package/dist/inline-assist/model.js +87 -0
  63. package/dist/inline-assist/model.js.map +1 -0
  64. package/dist/inline-assist/types.d.ts +222 -0
  65. package/dist/inline-assist/types.d.ts.map +1 -0
  66. package/dist/inline-assist/types.js +5 -0
  67. package/dist/inline-assist/types.js.map +1 -0
  68. package/dist/inline-assist.css +890 -0
  69. package/dist/inline-assist.d.ts +5 -0
  70. package/dist/inline-assist.d.ts.map +1 -0
  71. package/dist/inline-assist.js +12 -0
  72. package/dist/inline-assist.js.map +1 -0
  73. package/dist/internal/stream-run.d.ts +71 -0
  74. package/dist/internal/stream-run.d.ts.map +1 -0
  75. package/dist/internal/stream-run.js +161 -0
  76. package/dist/internal/stream-run.js.map +1 -0
  77. package/dist/internal/suggest.d.ts +96 -0
  78. package/dist/internal/suggest.d.ts.map +1 -0
  79. package/dist/internal/suggest.js +332 -0
  80. package/dist/internal/suggest.js.map +1 -0
  81. package/dist/smart-paste/fields.d.ts +31 -0
  82. package/dist/smart-paste/fields.d.ts.map +1 -0
  83. package/dist/smart-paste/fields.js +162 -0
  84. package/dist/smart-paste/fields.js.map +1 -0
  85. package/dist/smart-paste/useSmartPaste.d.ts +38 -0
  86. package/dist/smart-paste/useSmartPaste.d.ts.map +1 -0
  87. package/dist/smart-paste/useSmartPaste.js +56 -0
  88. package/dist/smart-paste/useSmartPaste.js.map +1 -0
  89. package/dist/smart-paste.d.ts +3 -0
  90. package/dist/smart-paste.d.ts.map +1 -0
  91. package/dist/smart-paste.js +6 -0
  92. package/dist/smart-paste.js.map +1 -0
  93. package/dist/styles.css +1754 -0
  94. package/dist/text-suggest/useTextSuggest.d.ts +13 -0
  95. package/dist/text-suggest/useTextSuggest.d.ts.map +1 -0
  96. package/dist/text-suggest/useTextSuggest.js +55 -0
  97. package/dist/text-suggest/useTextSuggest.js.map +1 -0
  98. package/dist/text-suggest.css +78 -0
  99. package/dist/text-suggest.d.ts +4 -0
  100. package/dist/text-suggest.d.ts.map +1 -0
  101. package/dist/text-suggest.js +9 -0
  102. package/dist/text-suggest.js.map +1 -0
  103. package/package.json +68 -4
@@ -0,0 +1,87 @@
1
+ // InlineAssist model: the per-instance
2
+ // store (response phase, command menu flag, the streamed text buffer) and
3
+ // the pure helpers the component uses. No React, no DOM globals.
4
+ import { createStreamBuffer } from '../internal/stream-run.js';
5
+ export const INLINE_ASSIST_DEFAULT_LOCALE_TEXT = Object.freeze({
6
+ label: 'AI assistant',
7
+ prompt: 'Prompt',
8
+ placeholder: 'Ask AI, or type / for commands',
9
+ send: 'Send',
10
+ stop: 'Stop',
11
+ accept: 'Accept',
12
+ discard: 'Discard',
13
+ retry: 'Retry',
14
+ commands: 'Commands',
15
+ responseActions: 'Response actions',
16
+ pending: 'Thinking…',
17
+ error: 'The response failed.',
18
+ dictation: 'Dictate',
19
+ });
20
+ const IDLE_VIEW = Object.freeze({ phase: 'idle', message: null, commands: false });
21
+ export function createAssistStore(schedule) {
22
+ let view = IDLE_VIEW;
23
+ const listeners = new Set();
24
+ const stream = createStreamBuffer(schedule);
25
+ return {
26
+ getView: () => view,
27
+ setView(patch) {
28
+ let changed = false;
29
+ for (const key of Object.keys(patch))
30
+ if (patch[key] !== undefined && !Object.is(patch[key], view[key]))
31
+ changed = true;
32
+ if (!changed)
33
+ return;
34
+ view = { ...view, ...patch };
35
+ for (const l of listeners)
36
+ l();
37
+ },
38
+ subscribe(listener) {
39
+ listeners.add(listener);
40
+ return () => void listeners.delete(listener);
41
+ },
42
+ stream,
43
+ dispose: () => stream.dispose(),
44
+ };
45
+ }
46
+ /** The filter text after a leading `/` (no whitespace), or `null` when the prompt is not a command query. */
47
+ export function commandQuery(value) {
48
+ const match = /^\/(\S*)$/.exec(value);
49
+ return match ? match[1] : null;
50
+ }
51
+ /** Commands whose label or keywords contain `query` (case-insensitive); all of them for an empty query. */
52
+ export function filterCommands(commands, query) {
53
+ const q = query.trim().toLowerCase();
54
+ if (q === '')
55
+ return commands;
56
+ return commands.filter((c) => c.label.toLowerCase().includes(q) || (c.keywords?.some((k) => k.toLowerCase().includes(q)) ?? false));
57
+ }
58
+ export const isPoint = (anchor) => anchor != null && typeof anchor.x === 'number' && typeof anchor.y === 'number' && !('getBoundingClientRect' in anchor);
59
+ /** A DOM `Range` (duck-typed, so the module stays free of DOM globals). */
60
+ export const isRange = (anchor) => anchor != null && typeof anchor.getBoundingClientRect === 'function' && typeof anchor.cloneContents === 'function';
61
+ /** The request's `selection`: the prop, else the text of a `Range` anchor, else `''`. Event time only. */
62
+ export function selectionText(anchor, selection) {
63
+ if (selection !== undefined)
64
+ return selection;
65
+ return isRange(anchor) ? anchor.toString() : '';
66
+ }
67
+ export function buildRequest(prompt, command, selection, messages) {
68
+ return Object.freeze({ prompt, command, selection, messages });
69
+ }
70
+ /** Appends `message`, or replaces the last message when `replaceLast` (Retry). */
71
+ export function commitMessage(messages, message, replaceLast) {
72
+ return replaceLast && messages.length > 0 ? [...messages.slice(0, -1), message] : [...messages, message];
73
+ }
74
+ /** The prompt after dictation: the text before dictation started, a space, then the transcript. */
75
+ export function mergeTranscript(base, transcript) {
76
+ if (transcript === '')
77
+ return base;
78
+ if (base === '' || /\s$/.test(base))
79
+ return base + transcript;
80
+ return `${base} ${transcript}`;
81
+ }
82
+ /** A frozen event whose `preventDefault()` cancels the built-in follow-up. */
83
+ export function cancelable(fields) {
84
+ let prevented = false;
85
+ return Object.freeze(Object.defineProperties({ ...fields, preventDefault: () => void (prevented = true) }, { defaultPrevented: { get: () => prevented, enumerable: true } }));
86
+ }
87
+ //# sourceMappingURL=model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.js","sourceRoot":"","sources":["../../src/inline-assist/model.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,0EAA0E;AAC1E,iEAAiE;AAEjE,OAAO,EAAE,kBAAkB,EAA0C,MAAM,2BAA2B,CAAC;AAGvG,MAAM,CAAC,MAAM,iCAAiC,GAAqC,MAAM,CAAC,MAAM,CAAC;IAC/F,KAAK,EAAE,cAAc;IACrB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,gCAAgC;IAC7C,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,OAAO;IACd,QAAQ,EAAE,UAAU;IACpB,eAAe,EAAE,kBAAkB;IACnC,OAAO,EAAE,WAAW;IACpB,KAAK,EAAE,sBAAsB;IAC7B,SAAS,EAAE,SAAS;CACrB,CAAC,CAAC;AAqBH,MAAM,SAAS,GAAe,MAAM,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,CAAC;AAE/F,MAAM,UAAU,iBAAiB,CAAC,QAAyB;IACzD,IA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AO,EAAE,SAAS,EAAE,QAAQ,EAAE,CAAC,CAAC;AACjE,CAAC;AAED,kFAAkF;AAClF,MAAM,UAAU,aAAa,CAAC,QAAwC,EAAE,OAA4B,EAAE,WAAoB;IACxH,OAAO,WAAW,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC3G,CAAC;AAED,mGAAmG;AACnG,MAAM,UAAU,eAAe,CAAC,IAAY,EAAE,UAAkB;IAC9D,IAAI,UAAU,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IACnC,IAAI,IAAI,KAAK,EAAE,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,GAAG,UAAU,CAAC;IAC9D,OAAO,GAAG,IAAI,IAAI,UAAU,EAAE,CAAC;AACjC,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,UAAU,CAAmB,MAAS;IACpD,IAAI,SAAS,GAAG,KAAK,CAAC;IACtB,OAAO,MAAM,CAAC,MAAM,CAClB,MAAM,CAAC,gBAAgB,CACrB,EAAE,GAAG,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,EAAE,EAC5D,EAAE,gBAAgB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,CACjE,CACoE,CAAC;AAC1E,CAAC"}
@@ -0,0 +1,222 @@
1
+ import type { CSSProperties, KeyboardEvent, ReactNode, Ref, RefObject, TextareaHTMLAttributes } from 'react';
2
+ import type { StreamPart } from '../internal/stream-run.js';
3
+ /** A point in viewport coordinates (`clientX` / `clientY`). */
4
+ export interface InlineAssistPoint {
5
+ readonly x: number;
6
+ readonly y: number;
7
+ }
8
+ /** What the popover is placed next to: an element, a text range (the selection), a point, or a ref to an element. */
9
+ export type InlineAssistAnchor = Element | Range | InlineAssistPoint | RefObject<Element | null>;
10
+ /** A typed response part; a plain string chunk is `{ type: 'text', delta }`. `reasoning` and `tool` parts are ignored by InlineAssist. */
11
+ export type InlineAssistResponsePart = StreamPart;
12
+ /** A slash command of the command menu. */
13
+ export interface InlineAssistCommand {
14
+ /** Stable id, reported in `onCommandSelect` and in the request. */
15
+ readonly id: string;
16
+ /** Menu text; also what typing after `/` filters on. */
17
+ readonly label: string;
18
+ /** Prompt sent when the command is chosen (default: `label`). */
19
+ readonly prompt?: string;
20
+ /** More words that match the filter. */
21
+ readonly keywords?: readonly string[];
22
+ /** Decorative leading icon. */
23
+ readonly icon?: ReactNode;
24
+ readonly disabled?: boolean;
25
+ }
26
+ /** One prompt and its response. */
27
+ export interface InlineAssistMessage {
28
+ readonly id: string;
29
+ readonly prompt: string;
30
+ /** Id of the command that produced the prompt. */
31
+ readonly command?: string;
32
+ readonly response: string;
33
+ /** `'aborted'`: stopped by Stop or by closing; `'error'`: the adapter threw. */
34
+ readonly status: 'done' | 'aborted' | 'error';
35
+ }
36
+ export interface InlineAssistRequest {
37
+ /** The prompt text (a command's `prompt` when a command was chosen). */
38
+ readonly prompt: string;
39
+ /** The chosen command, if any. */
40
+ readonly command: InlineAssistCommand | undefined;
41
+ /** The selected text: `selection`, else the text of a `Range` anchor, else `''`. */
42
+ readonly selection: string;
43
+ /** Earlier prompts and responses (without the new one). */
44
+ readonly messages: readonly InlineAssistMessage[];
45
+ }
46
+ export type InlineAssistAdapter = (request: InlineAssistRequest, context: {
47
+ readonly signal: AbortSignal;
48
+ }) => PromiseLike<string> | AsyncIterable<string | InlineAssistResponsePart>;
49
+ export type InlineAssistMode = 'popover' | 'inline';
50
+ export type InlineAssistOpenChangeReason = 'escape' | 'outside' | 'focus-outside' | 'accept' | 'discard' | 'api';
51
+ export interface InlineAssistOpenChangeEvent {
52
+ readonly reason: InlineAssistOpenChangeReason;
53
+ }
54
+ export interface InlineAssistSendEvent {
55
+ readonly request: InlineAssistRequest;
56
+ }
57
+ export interface InlineAssistBeforeSendEvent extends InlineAssistSendEvent {
58
+ /** Sends nothing and keeps the prompt. */
59
+ preventDefault(): void;
60
+ readonly defaultPrevented: boolean;
61
+ }
62
+ export interface InlineAssistCommandSelectEvent {
63
+ readonly command: InlineAssistCommand;
64
+ /** Skips the built-in send of the command prompt. */
65
+ preventDefault(): void;
66
+ readonly defaultPrevented: boolean;
67
+ }
68
+ export interface InlineAssistMessagesChangeEvent {
69
+ /** `'response'`: a response finished (or stopped); `'retry'`: Retry replaced the last response. */
70
+ readonly reason: 'response' | 'retry';
71
+ }
72
+ /** Built-in response actions. */
73
+ export type InlineAssistBuiltInAction = 'accept' | 'discard' | 'retry';
74
+ export interface InlineAssistCustomAction {
75
+ readonly id: string;
76
+ readonly label: string;
77
+ readonly icon?: ReactNode;
78
+ }
79
+ export type InlineAssistResponseAction = InlineAssistBuiltInAction | InlineAssistCustomAction;
80
+ export interface InlineAssistResponseActionEvent {
81
+ /** `'accept'`, `'discard'`, `'retry'` or a custom action's `id`. */
82
+ readonly action: string;
83
+ readonly text: string;
84
+ readonly message: InlineAssistMessage;
85
+ /** Cancels the built-in follow-up of a built-in action. */
86
+ preventDefault(): void;
87
+ readonly defaultPrevented: boolean;
88
+ }
89
+ export interface InlineAssistAcceptEvent {
90
+ readonly text: string;
91
+ readonly message: InlineAssistMessage;
92
+ }
93
+ export interface InlineAssistDiscardEvent {
94
+ readonly message: InlineAssistMessage;
95
+ }
96
+ /** Imperative API (`ref`). */
97
+ export interface InlineAssistApi {
98
+ open(): void;
99
+ close(): void;
100
+ /** Sends `text` (default: the current prompt) as a new request. */
101
+ send(text?: string): void;
102
+ /** Aborts the running response. */
103
+ stop(): void;
104
+ /** Shows the command menu (unfiltered). */
105
+ showCommands(): void;
106
+ hideCommands(): void;
107
+ /** Focuses the prompt. */
108
+ focus(): void;
109
+ /** The dialog element while open. */
110
+ readonly element: HTMLElement | null;
111
+ }
112
+ /** Props of the default prompt `<textarea>`; spread them on a custom input in `renderComposer`. */
113
+ export type InlineAssistInputProps = Omit<TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange' | 'onKeyDown' | 'value'> & {
114
+ readonly ref: Ref<HTMLTextAreaElement>;
115
+ readonly value: string;
116
+ readonly onChange: (event: {
117
+ readonly currentTarget: {
118
+ readonly value: string;
119
+ };
120
+ }) => void;
121
+ readonly onKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
122
+ };
123
+ export interface InlineAssistComposerRenderProps {
124
+ readonly value: string;
125
+ readonly setValue: (value: string) => void;
126
+ readonly send: (text?: string) => void;
127
+ readonly stop: () => void;
128
+ /** A response is pending or streaming. */
129
+ readonly responding: boolean;
130
+ readonly inputProps: InlineAssistInputProps;
131
+ /** The built-in `<textarea>`. */
132
+ readonly defaultComposer: ReactNode;
133
+ }
134
+ export interface InlineAssistContentOptions {
135
+ /** The text is still streaming. */
136
+ readonly streaming: boolean;
137
+ }
138
+ /** User-visible strings. */
139
+ export interface InlineAssistLocaleText {
140
+ /** Accessible name of the dialog. Default `"AI assistant"`. */
141
+ readonly label?: string;
142
+ /** Accessible name of the prompt. Default `"Prompt"`. */
143
+ readonly prompt?: string;
144
+ /** Default `"Ask AI, or type / for commands"`. */
145
+ readonly placeholder?: string;
146
+ readonly send?: string;
147
+ readonly stop?: string;
148
+ readonly accept?: string;
149
+ readonly discard?: string;
150
+ readonly retry?: string;
151
+ /** Accessible name of the command menu. Default `"Commands"`. */
152
+ readonly commands?: string;
153
+ /** Accessible name of the response actions. Default `"Response actions"`. */
154
+ readonly responseActions?: string;
155
+ /** Shown while the response is pending. Default `"Thinking…"`. */
156
+ readonly pending?: string;
157
+ /** Shown when the adapter failed. */
158
+ readonly error?: string;
159
+ /** Accessible name of the dictation button. Default `"Dictate"`. */
160
+ readonly dictation?: string;
161
+ }
162
+ export type {} from '@salmonui/core/locale';
163
+ declare module '@salmonui/core/locale' {
164
+ interface LocaleCatalog {
165
+ readonly inlineAssist?: InlineAssistLocaleText | undefined;
166
+ }
167
+ }
168
+ export interface InlineAssistProps {
169
+ /** Element, text range, viewport point or element ref the popover is placed next to. */
170
+ readonly anchor?: InlineAssistAnchor | null | undefined;
171
+ readonly open?: boolean | undefined;
172
+ /** Applied after hydration (the server renders the assist closed). */
173
+ readonly defaultOpen?: boolean | undefined;
174
+ readonly onOpenChange?: ((open: boolean, event: InlineAssistOpenChangeEvent) => void) | undefined;
175
+ /** `'popover'` (default): an anchored top-layer popover. `'inline'`: rendered in place, in the flow of the page. */
176
+ readonly mode?: InlineAssistMode | undefined;
177
+ /** Prompt text (controlled). */
178
+ readonly value?: string | undefined;
179
+ readonly defaultValue?: string | undefined;
180
+ readonly onValueChange?: ((value: string) => void) | undefined;
181
+ /** Prompt and response history (controlled). */
182
+ readonly messages?: readonly InlineAssistMessage[] | undefined;
183
+ readonly defaultMessages?: readonly InlineAssistMessage[] | undefined;
184
+ readonly onMessagesChange?: ((messages: readonly InlineAssistMessage[], event: InlineAssistMessagesChangeEvent) => void) | undefined;
185
+ readonly placeholder?: string | undefined;
186
+ /** Produces the response. */
187
+ readonly adapter?: InlineAssistAdapter | undefined;
188
+ /** Selected text passed in the request (default: the text of a `Range` anchor). */
189
+ readonly selection?: string | undefined;
190
+ readonly onBeforeSend?: ((event: InlineAssistBeforeSendEvent) => void) | undefined;
191
+ readonly onSend?: ((event: InlineAssistSendEvent) => void) | undefined;
192
+ /** The adapter threw. */
193
+ readonly onError?: ((error: unknown) => void) | undefined;
194
+ /** Slash commands, shown as a `Menu` when the prompt starts with `/` or through `api.showCommands()`. */
195
+ readonly commands?: readonly InlineAssistCommand[] | undefined;
196
+ readonly onCommandSelect?: ((event: InlineAssistCommandSelectEvent) => void) | undefined;
197
+ /** Actions under a finished response. Default `['accept', 'discard', 'retry']`. */
198
+ readonly responseActions?: readonly InlineAssistResponseAction[] | undefined;
199
+ readonly onResponseActionClick?: ((event: InlineAssistResponseActionEvent) => void) | undefined;
200
+ /** Accept: insert `text` into the editor. Closes the assist. */
201
+ readonly onAccept?: ((event: InlineAssistAcceptEvent) => void) | undefined;
202
+ /** Discard: the response is dropped. Closes the assist. */
203
+ readonly onDiscard?: ((event: InlineAssistDiscardEvent) => void) | undefined;
204
+ /** Extra controls next to the prompt (`'inline'`, default) or in a row below it (`'bottom'`). */
205
+ readonly toolbar?: ReactNode;
206
+ readonly toolbarPlacement?: 'inline' | 'bottom' | undefined;
207
+ /** Replaces the prompt input. */
208
+ readonly renderComposer?: ((props: InlineAssistComposerRenderProps) => ReactNode) | undefined;
209
+ /** Renders response text (default: plain text with line breaks). Never receives HTML; bring a Markdown renderer here. */
210
+ readonly renderContent?: ((text: string, options: InlineAssistContentOptions) => ReactNode) | undefined;
211
+ /** Return focus to the element focused before opening (the editor) on close. Default true. */
212
+ readonly returnFocus?: boolean | undefined;
213
+ readonly localeText?: InlineAssistLocaleText | undefined;
214
+ /** Parts in the composer row, such as `InlineAssist.Dictation`. */
215
+ readonly children?: ReactNode;
216
+ readonly className?: string | undefined;
217
+ readonly style?: CSSProperties | undefined;
218
+ readonly 'aria-label'?: string | undefined;
219
+ readonly 'aria-labelledby'?: string | undefined;
220
+ readonly ref?: Ref<InlineAssistApi> | undefined;
221
+ }
222
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/inline-assist/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAC;AAC7G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D,+DAA+D;AAC/D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,C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+ // Public types of `@salmonui/chat/inline-assist`. The adapter
2
+ // contract mirrors the Conversation adapter: a Promise is one final
3
+ // response, an AsyncIterable streams, a plain string chunk is a text delta.
4
+ export {};
5
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/inline-assist/types.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,oEAAoE;AACpE,4EAA4E"}