@aintela/chat 0.2.56 → 0.2.57
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/components.js +6139 -6121
- package/dist/components.js.map +1 -1
- package/dist/src/components/AiChat/AiChatContext.d.ts +7 -0
- package/dist/src/components/AiChat/AiChatTypes.d.ts +34 -0
- package/dist/src/components/AiChat/ChatPane/MessageAgent.d.ts +7 -0
- package/dist/src/components/AiChat/ChatPane/askUserInline.test.d.ts +1 -0
- package/dist/src/components/AiChat/ChatPane/parts/types.d.ts +7 -0
- package/package.json +1 -1
|
@@ -40,6 +40,13 @@ export interface AiChatContextState {
|
|
|
40
40
|
* drawn twice (issue #235).
|
|
41
41
|
*/
|
|
42
42
|
autoRenderAskUserSheet: boolean;
|
|
43
|
+
/** Where a parked ask-user prompt is presented — docked sheet, or inline in the transcript. */
|
|
44
|
+
askUserPresentation: 'sheet' | 'inline';
|
|
45
|
+
/** Host chrome around the inline question (see {@link askUserPresentation}). */
|
|
46
|
+
askUserInlineContainer?: ComponentType<{
|
|
47
|
+
children: ReactNode;
|
|
48
|
+
toolName?: string;
|
|
49
|
+
}>;
|
|
43
50
|
setShowToolCalls: (show: boolean) => void;
|
|
44
51
|
friendlyMode: boolean;
|
|
45
52
|
setFriendlyMode: (enabled: boolean) => void;
|
|
@@ -168,6 +168,40 @@ export interface AiChatProps extends AiChatStyleProps {
|
|
|
168
168
|
* such hosts can drop it into their own positioned wrapper.
|
|
169
169
|
*/
|
|
170
170
|
autoRenderAskUserSheet?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* WHERE a parked ask_user / askauth prompt is presented. Same tool call, same park, same
|
|
173
|
+
* answer — only the format changes.
|
|
174
|
+
*
|
|
175
|
+
* <p>`'sheet'` (default) is the docked {@link AskUserSheet}: it slides up over the conversation,
|
|
176
|
+
* above the composer. `'inline'` draws the question IN THE TURN instead — the parked part stops
|
|
177
|
+
* being suppressed in the transcript and renders at its own position, after the tool call that
|
|
178
|
+
* asked and above the turn's trailing "…" dots, like any other part. That is the shape a phone
|
|
179
|
+
* needs: a sheet there opens to 400px over a transcript that has none to spare, and it carries a
|
|
180
|
+
* grabber, a collapse and a close for a call the server has PARKED and that must be answered
|
|
181
|
+
* rather than dismissed.</p>
|
|
182
|
+
*
|
|
183
|
+
* <p>Because it is the part's own position, the answered summary later replaces the question
|
|
184
|
+
* exactly where the question stood — nothing moves, and the transcript is never scrolled to
|
|
185
|
+
* reveal anything.</p>
|
|
186
|
+
*
|
|
187
|
+
* <p>The two are mutually exclusive by construction: `'inline'` suppresses ChatPane's sheet
|
|
188
|
+
* whatever {@link autoRenderAskUserSheet} says. A host that also docks its OWN
|
|
189
|
+
* {@link AskUserSheet} must stop doing so when it asks for `'inline'`, or the same question is
|
|
190
|
+
* on screen twice.</p>
|
|
191
|
+
*/
|
|
192
|
+
askUserPresentation?: 'sheet' | 'inline';
|
|
193
|
+
/**
|
|
194
|
+
* Chrome around the inline question — the host's card. Receives the rendered question face as
|
|
195
|
+
* `children` and the asking tool's name (already stripped of the connector's plugin qualifier).
|
|
196
|
+
* Given one, the question face is drawn `embedded`, so the card's border and padding are the
|
|
197
|
+
* only ones. Optional: with none, the question renders with its own default chrome. Ignored
|
|
198
|
+
* unless {@link askUserPresentation} is `'inline'`, and never applied inside a sheet or dialog,
|
|
199
|
+
* which own their chrome already.
|
|
200
|
+
*/
|
|
201
|
+
askUserInlineContainer?: React.ComponentType<{
|
|
202
|
+
children: React.ReactNode;
|
|
203
|
+
toolName?: string;
|
|
204
|
+
}>;
|
|
171
205
|
friendlyMode?: boolean;
|
|
172
206
|
/**
|
|
173
207
|
* Per-part renderer overrides. Map a `PartKind` ('text' | 'thought' |
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Interaction } from '../../../models/Interaction';
|
|
3
|
+
import { InteractionPart } from '../../../models/InteractionPart';
|
|
4
|
+
export declare function hideUnfinishedUiParts(parts: InteractionPart[], onGoing: boolean,
|
|
5
|
+
/**
|
|
6
|
+
* `askUserPresentation === 'inline'`: the parked question has no other surface, so it must stay in
|
|
7
|
+
* the stream and render HERE, at its own position in the turn. See the filter below.
|
|
8
|
+
*/
|
|
9
|
+
keepParkedAskUser?: boolean): InteractionPart[];
|
|
3
10
|
interface MessageAgentProps {
|
|
4
11
|
message: Interaction;
|
|
5
12
|
onGoing: boolean;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,6 +26,13 @@ export declare const isAskUser: (name?: string | null) => boolean;
|
|
|
26
26
|
* bare `askauth`; live LLM connectors qualify it as `{Plugin}-askauth` / `{Plugin}_askauth`.
|
|
27
27
|
*/
|
|
28
28
|
export declare const isAskAuth: (name?: string | null) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* The tool name as a HUMAN should read it. Live LLM connectors qualify the SDK's built-ins with the
|
|
31
|
+
* plugin that carries them — `HumanInteractionTool-ask_user` — which is an implementation detail of
|
|
32
|
+
* the connector, and a mouthful in a 360px header. Host-registered names (`ask_for_reason`) are
|
|
33
|
+
* already what their author called them and pass through untouched.
|
|
34
|
+
*/
|
|
35
|
+
export declare const askUserDisplayName: (name?: string | null) => string | undefined;
|
|
29
36
|
/** Built-in ask-user component names (the server's [KernelUIComponent] values for the SDK tools). */
|
|
30
37
|
export declare const ASK_USER_COMPONENT = "AskUserPart";
|
|
31
38
|
export declare const ASK_AUTH_COMPONENT = "AskAuthPart";
|