@agimon-ai/po-native-dashboard 0.0.0-alpha.4 → 0.0.0-alpha.6
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/Composer.d.mts +1 -1
- package/dist/components/Composer.d.mts.map +1 -1
- package/dist/screens/SessionScreen.d.mts +4 -1
- package/dist/screens/SessionScreen.d.mts.map +1 -1
- package/dist/screens/SessionScreen.mjs +8 -1
- package/dist/screens/SessionScreen.mjs.map +1 -1
- package/package.json +7 -7
|
@@ -42,6 +42,6 @@ export interface ComposerProps {
|
|
|
42
42
|
quiet?: boolean;
|
|
43
43
|
}
|
|
44
44
|
/** The text box, then the options button and Send in one row outside it. Context and cost sit in the options sheet. */
|
|
45
|
-
export declare function Composer({ onSend, disabled, initialText, value, onChangeText, running: suppliedRunning, onAbort, mode: suppliedMode, onOpenOptions, completion: suppliedCompletion, draftStore, sessionId, live, searchFiles, uploadAttachment, slotProps, captures, onRemoveCapture, quiet }: ComposerProps): string | number | bigint | boolean |
|
|
45
|
+
export declare function Composer({ onSend, disabled, initialText, value, onChangeText, running: suppliedRunning, onAbort, mode: suppliedMode, onOpenOptions, completion: suppliedCompletion, draftStore, sessionId, live, searchFiles, uploadAttachment, slotProps, captures, onRemoveCapture, quiet }: ComposerProps): string | number | bigint | boolean | Iterable<import("react").ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined> | import("react").JSX.Element | null | undefined;
|
|
46
46
|
//#endregion
|
|
47
47
|
//# sourceMappingURL=Composer.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Composer.d.mts","names":[],"sources":["../../src/components/Composer.tsx"],"mappings":";;;;iBAiDiB;;EAEf,SAAS;EACT;EACA;;EAEA;EACA,gBAAgB;EAChB,aAAa,MAAM;EACnB;;EAEA;EACA,eAAe,kBAAkB;;EAEjC,oBACE,mBACA;IAAQ;IAAc;IAAkB,OAAO,WAAW;QACvD;IAAU;IAAc;IAAkB;;;EAE/C;EACA;;EAEA;EACA;;EAEA,aAAa;;EAEb,YAAY;;EAEZ,oBAAoB;EACpB,mBAAmB,SAAS;;EAE5B;;;wBAkBc,WACd,QACA,UACA,aACA,OACA,cACA,SAAS,iBACT,SACA,MAAM,cACN,eACA,YAAY,oBACZ,YACA,WACA,MACA,aACA,kBACA,WACA,UACA,iBACA,SACC,
|
|
1
|
+
{"version":3,"file":"Composer.d.mts","names":[],"sources":["../../src/components/Composer.tsx"],"mappings":";;;;iBAiDiB;;EAEf,SAAS;EACT;EACA;;EAEA;EACA,gBAAgB;EAChB,aAAa,MAAM;EACnB;;EAEA;EACA,eAAe,kBAAkB;;EAEjC,oBACE,mBACA;IAAQ;IAAc;IAAkB,OAAO,WAAW;QACvD;IAAU;IAAc;IAAkB;;;EAE/C;EACA;;EAEA;EACA;;EAEA,aAAa;;EAEb,YAAY;;EAEZ,oBAAoB;EACpB,mBAAmB,SAAS;;EAE5B;;;wBAkBc,WACd,QACA,UACA,aACA,OACA,cACA,SAAS,iBACT,SACA,MAAM,cACN,eACA,YAAY,oBACZ,YACA,WACA,MACA,aACA,kBACA,WACA,UACA,iBACA,SACC,qDAAa,yBAAA,aAAA,6DAAA,8BAAA,+CAAA,8BAAA,yBAAA,iDAAA,IAAA"}
|
|
@@ -29,7 +29,10 @@ export interface SessionScreenProps extends NativeTemplateSessionProps {
|
|
|
29
29
|
export interface SessionTranscript {
|
|
30
30
|
/** Called once per transcript, so the grouper can keep unchanged groups by identity between renders. */
|
|
31
31
|
createGrouper: () => (entries: readonly TimelineEntry$1[]) => TimelineEntry$1[];
|
|
32
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* `entry` arrives with images the transcript sent by reference filled in once read.
|
|
34
|
+
* `builtIn` draws one entry the default way, with plugin tool cards, for rows the template keeps.
|
|
35
|
+
*/
|
|
33
36
|
renderItem: (entry: TimelineEntry$1, builtIn: (entry: TimelineEntry$1) => ReactElement,
|
|
34
37
|
/** The session's slot props, for a row that opens plugin surfaces such as Author. */
|
|
35
38
|
slotProps: WebPluginSlotProps) => ReactElement | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionScreen.d.mts","names":["TimelineEntry","DashboardEntry"],"sources":["../../src/screens/SessionScreen.tsx"],"mappings":";;;;;;;;;iBA6DiB;EACf;EACA,MAAM;EACN,QAAQ;EACR;EACA;EACA;;;;;;iBAOe,2BAA2B;EAC1C,mBAAmBA;;EAEnB,WAAW,KAAK;;EAEhB,aAAa;;iBAGE;;EAEf,sBAAsB,kBAAkBA,sBAAoBA
|
|
1
|
+
{"version":3,"file":"SessionScreen.d.mts","names":["TimelineEntry","DashboardEntry"],"sources":["../../src/screens/SessionScreen.tsx"],"mappings":";;;;;;;;;iBA6DiB;EACf;EACA,MAAM;EACN,QAAQ;EACR;EACA;EACA;;;;;;iBAOe,2BAA2B;EAC1C,mBAAmBA;;EAEnB,WAAW,KAAK;;EAEhB,aAAa;;iBAGE;;EAEf,sBAAsB,kBAAkBA,sBAAoBA;;;;;EAK5D,aACE,OAAOA,iBACP,UAAU,OAAOA,oBAAkB;;EAEnC,WAAW,uBACR;;EAEL,aAAa,kBAAkBA;;wBAUjB,cAAc,OAAO,qCAAkB,IAAA;;wBAuXvC,4BAA4B,OAAOC,kBAAmBD;;;;;;;;wBAmBtD,sBAAsB,kBAAkBA,sBAAoBA;;wBAmG5D,YAAY,OAAOC,gBAAiBD;;wBA0DpC,mBACd,WACA,UACA,SACA;EAEA;EACA;EACA,UAAU;EACV,WAAW,KAAK;oBACjB,IAAA"}
|
|
@@ -216,6 +216,10 @@ function PluginToolMessage({ message: Message, props }) {
|
|
|
216
216
|
result
|
|
217
217
|
});
|
|
218
218
|
}
|
|
219
|
+
/** A template row reads images inline too, so it gets the entry with referenced images filled in. */
|
|
220
|
+
function TemplateItem({ entry, render }) {
|
|
221
|
+
return render(useImageRefs(entry));
|
|
222
|
+
}
|
|
219
223
|
function LiveActivity({ sessionId, error, showsWork }) {
|
|
220
224
|
const mapEntry = useMemo(createNativeEntryMapper, []);
|
|
221
225
|
const working = useStore(sessionStoreFor(sessionId), (state) => state.streaming && !showsWork?.(state.entries.flatMap(mapEntry)));
|
|
@@ -294,7 +298,10 @@ const SessionTimeline = memo(function SessionTimeline({ sessionId, entries, live
|
|
|
294
298
|
onMessageActions,
|
|
295
299
|
markdown
|
|
296
300
|
});
|
|
297
|
-
return transcript ?
|
|
301
|
+
return transcript ? /* @__PURE__ */ jsx(TemplateItem, {
|
|
302
|
+
entry,
|
|
303
|
+
render: (item) => transcript.renderItem(item, builtIn, slotProps)
|
|
304
|
+
}) : builtIn(entry);
|
|
298
305
|
}, [
|
|
299
306
|
renderTool,
|
|
300
307
|
onMessageActions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionScreen.mjs","names":["NativeTemplateSessionProps","ToolMessageRenderProps","ToolResultView","ThreadViewOptions","WebPluginSlotProps","Button","fontOf","List","MarkdownProps","Tabs","TabsList","TabsTrigger","ImageRefScope","subscribeWebPluginRegistry","personaInitials","sessionStoreFor","subscribeThread","unsubscribeThread","threadStoreKey","holdSessionChannels","HOST_SLOTS","pluginUserMessageActions","renderRegion","slotFills","TimelineEntry","DashboardEntry","toolMessageProps","toolPromptClaim","ToolPromptInput","ToolRendererBoundary","useImageRefs","webTabs","useRenderTrace","useStore","ComponentType","memo","ReactElement","ReactNode","useCallback","useEffect","useMemo","useReducer","useState","AccessibilityInfo","StyleSheet","ActivityPanel","Composer","ComposerProps","DialogSheet","MessageActionsSheet","nativeSlotProps","TimelineItem","CONVERSATION_TAB","EMPTY_ENTRIES","EMPTY_STATUSES","Readonly","Record","MemoTimelineItem","entryKey","entry","id","TOOL_GROUP_LIMIT","ToolPayload","toolCallId","args","result","output","running","isError","SessionScreenProps","entries","composer","Omit","transcript","SessionTranscript","createGrouper","renderItem","builtIn","slotProps","showsWork","useRegistryVersion","version","bump","value","SessionScreen","props","sessionId","onSend","sessionToolRenderer","ask","onAnswer","onCancel","activity","error","stopped","offline","statuses","activeTab","setActiveTab","drafts","setDrafts","actionTarget","setActionTarget","messageActions","updateDraft","onDraftChange","text","current","tabId","addition","trim","draft","initialText","separator","test","pluginTabs","tabs","label","map","ActivePanel","find","tab","panel","prompt","readOnly","promptInput","fallbackAsk","dialogValue","onDialogValueChange","asking","dialog","name","failed","askingId","undefined","askingTitle","title","announceForAccessibility","emptyRegion","length","emptyStateRegion","composerShown","retainComposer","styles","screen","list","liveTranscript","markdown","offlineText","restoring","onRestore","promptDock","promptInset","promptError","contextItems","item","source","onRemoveContext","stoppedTitle","stoppedText","folder","stoppedError","waking","onWake","Boolean","draftStore","overlay","pluginId","component","Overlay","PluginToolMessage","message","Message","P","LiveActivity","mapEntry","createNativeEntryMapper","working","state","streaming","flatMap","SessionTimeline","live","onMessageActions","raw","groupTools","createToolGrouper","data","registryVersion","renderTool","toolName","tool","payload","details","nested","NonNullable","call","Nested","content","block","type","join","nestedFailed","cache","WeakMap","mapped","get","nativeEntry","set","previous","Map","next","out","run","flush","first","push","old","same","calls","every","index","group","role","create","theme","rt","maxHeight","paddingBottom","insets","ime","bottom","uni__dependencies","paddingHorizontal","spacing","fontFamily","sans","fontSize","sm","lineHeight","color","colors","red","flexDirection","flexWrap","gap","flex","backgroundColor","bg","paddingVertical","margin","padding","borderRadius","lg","borderWidth","borderColor","base","fontWeight","semibold","hi","lineHeightRelaxed","dim","alignItems","paddingLeft","paddingRight","at","timestamp","kind","images","identity","profile","author","initials","tone","tools","argSummary","NativeTranscript","threadId","options","Pick","key","limit","visible","slice"],"sources":["../../src/screens/SessionScreen.tsx"],"sourcesContent":["import type { NativeTemplateSessionProps } from '@agimon-ai/po-core/native';\nimport type {\n ToolMessageRenderProps,\n ToolResultView,\n ThreadViewOptions,\n WebPluginSlotProps,\n} from '@agimon-ai/po-core/web';\nimport { Button, fontOf, List, type MarkdownProps, Tabs, TabsList, TabsTrigger } from '@agimon-ai/po-native-components';\nimport {\n ImageRefScope,\n subscribeWebPluginRegistry,\n personaInitials,\n sessionStoreFor,\n subscribeThread,\n unsubscribeThread,\n threadStoreKey,\n holdSessionChannels,\n HOST_SLOTS,\n pluginUserMessageActions,\n renderRegion,\n slotFills,\n type TimelineEntry as DashboardEntry,\n toolMessageProps,\n toolPromptClaim,\n type ToolPromptInput,\n ToolRendererBoundary,\n useImageRefs,\n webTabs,\n useRenderTrace,\n} from '@agimon-ai/po-web-dashboard/core';\nimport { useStore } from '@tanstack/react-store';\nimport {\n type ComponentType,\n memo,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useState,\n} from 'react';\nimport { AccessibilityInfo, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { ActivityPanel } from '../components/ActivityPanel';\nimport { Composer, type ComposerProps } from '../components/Composer';\nimport { DialogSheet } from '../components/DialogSheet';\nimport { MessageActionsSheet } from '../components/MessageActionsSheet';\nimport { nativeSlotProps } from '../components/slotProps';\nimport { type TimelineEntry, TimelineItem } from '../components/TimelineItem';\n\nconst CONVERSATION_TAB = 'conversation';\nconst EMPTY_ENTRIES: readonly TimelineEntry[] = [];\nconst EMPTY_STATUSES: Readonly<Record<string, string>> = {};\nconst MemoTimelineItem = memo(TimelineItem);\nconst entryKey = (entry: TimelineEntry) => entry.id;\n/** The most tool calls one transcript cell holds; a longer run splits into several groups. */\nconst TOOL_GROUP_LIMIT = 20;\n\n/** The tool entry fields a plugin renderer reads, carried as TimelineEntry.payload. */\nexport interface ToolPayload {\n toolCallId: string;\n args: Record<string, unknown>;\n result: ToolResultView | null;\n output: string;\n running: boolean;\n isError: boolean;\n}\n\n/**\n * The app's session contract plus the presentation hooks a template may add. Every addition is\n * optional, so a template screen typed with these props still accepts what the app hands it.\n */\nexport interface SessionScreenProps extends NativeTemplateSessionProps {\n entries?: readonly TimelineEntry[];\n /** Options and run controls for the composer row. */\n composer?: Omit<ComposerProps, 'onSend' | 'disabled' | 'value' | 'onChangeText'>;\n /** Lets a template regroup and redraw transcript rows; absent keeps the built-in tool groups and rows. */\n transcript?: SessionTranscript;\n}\n\nexport interface SessionTranscript {\n /** Called once per transcript, so the grouper can keep unchanged groups by identity between renders. */\n createGrouper: () => (entries: readonly TimelineEntry[]) => TimelineEntry[];\n /** `builtIn` draws one entry the default way, with plugin tool cards, for rows the template keeps. */\n renderItem: (\n entry: TimelineEntry,\n builtIn: (entry: TimelineEntry) => ReactElement,\n /** The session's slot props, for a row that opens plugin surfaces such as Author. */\n slotProps: WebPluginSlotProps,\n ) => ReactElement | null;\n /** True when a row already shows the turn at work, so the screen leaves out its own Working line. */\n showsWork?: (entries: readonly TimelineEntry[]) => boolean;\n}\n\n/** Re-renders when plugin installs change what the registry resolves. */\nfunction useRegistryVersion(): number {\n const [version, bump] = useReducer((value: number) => value + 1, 0);\n useEffect(() => subscribeWebPluginRegistry(bump), []);\n return version;\n}\n\nexport function SessionScreen(props: SessionScreenProps) {\n useRenderTrace('SessionScreen');\n const {\n sessionId,\n entries = EMPTY_ENTRIES,\n onSend,\n sessionToolRenderer,\n ask,\n onAnswer,\n onCancel,\n activity,\n error,\n composer,\n stopped,\n offline,\n } = props;\n const statuses = props.statuses ?? EMPTY_STATUSES;\n const [activeTab, setActiveTab] = useState(CONVERSATION_TAB);\n const [drafts, setDrafts] = useState<Record<string, string>>({});\n const [actionTarget, setActionTarget] = useState<TimelineEntry>();\n const messageActions = pluginUserMessageActions();\n const updateDraft =\n props.onDraftChange ?? ((text: string) => setDrafts((current) => ({ ...current, [sessionId]: text })));\n useRegistryVersion();\n const slotProps =\n props.slotProps ??\n nativeSlotProps(\n sessionId,\n statuses,\n (tabId) => setActiveTab(tabId ?? CONVERSATION_TAB),\n (text) => {\n const addition = text.trim();\n if (!addition) return;\n setDrafts((current) => {\n const draft = current[sessionId] ?? composer?.initialText ?? '';\n const separator = draft === '' || /\\s$/.test(draft) ? '' : ' ';\n return { ...current, [sessionId]: `${draft}${separator}${addition}` };\n });\n },\n );\n const pluginTabs = webTabs(sessionId);\n const tabs = [{ id: CONVERSATION_TAB, label: 'Conversation' }, ...pluginTabs.map(({ id, label }) => ({ id, label }))];\n const ActivePanel = pluginTabs.find((tab) => tab.id === activeTab)?.panel;\n const prompt =\n !props.readOnly && props.promptInput && onAnswer && onCancel\n ? // The app builds it from the dashboard's own session state, so the contract's wide shape narrows back.\n toolPromptClaim(props.promptInput as ToolPromptInput, null, sessionId)\n : null;\n const fallbackAsk =\n !props.readOnly && ask && onAnswer ? (\n <DialogSheet\n ask={ask}\n onAnswer={onAnswer}\n onCancel={onCancel}\n value={props.dialogValue}\n onChangeValue={props.onDialogValueChange}\n />\n ) : null;\n const asking =\n prompt && onAnswer && onCancel ? (\n <ToolRendererBoundary key={`${sessionId}:${prompt.dialog.id}`} toolName={prompt.entry?.name ?? 'dialog'}>\n {(failed) =>\n failed ? (\n fallbackAsk\n ) : prompt.entry ? (\n <prompt.prompt.component\n {...toolMessageProps(slotProps, prompt.entry, statuses)}\n dialog={prompt.dialog}\n answer={(value) => onAnswer(prompt.dialog.id, value)}\n cancel={() => onCancel(prompt.dialog.id)}\n />\n ) : (\n <prompt.prompt.component\n {...slotProps}\n dialog={prompt.dialog}\n answer={(value) => onAnswer(prompt.dialog.id, value)}\n cancel={() => onCancel(prompt.dialog.id)}\n />\n )\n }\n </ToolRendererBoundary>\n ) : (\n fallbackAsk\n );\n const askingId = asking === null ? undefined : (prompt?.dialog.id ?? ask?.id);\n const askingTitle = prompt?.dialog.title ?? ask?.title;\n // Screen readers hear a question once when it arrives, not on every re-render.\n useEffect(() => {\n if (askingId !== undefined)\n AccessibilityInfo.announceForAccessibility(`Po is asking: ${askingTitle ?? 'a question'}`);\n }, [askingId, askingTitle]);\n // An empty conversation a person's own package may fill on the phone; with no fill the list shows as before.\n const emptyRegion =\n entries.length === 0 ? renderRegion(HOST_SLOTS.emptyStateRegion, null, slotProps, sessionId) : null;\n const composerShown =\n !props.readOnly && !stopped && !prompt && (props.panel === undefined || props.retainComposer === true);\n return (\n <View style={styles.screen}>\n {!props.slotProps && tabs.length > 1 ? (\n <Tabs value={activeTab} onValueChange={setActiveTab}>\n <TabsList>\n {tabs.map((tab) => (\n <TabsTrigger key={tab.id} value={tab.id}>\n {tab.label}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n ) : null}\n {props.panel !== undefined ? (\n <View style={styles.list}>{props.panel}</View>\n ) : ActivePanel ? (\n <View style={styles.list}>\n <ActivePanel {...slotProps} />\n </View>\n ) : emptyRegion ? (\n <View style={styles.list}>{emptyRegion}</View>\n ) : (\n <SessionTimeline\n sessionId={sessionId}\n entries={entries}\n live={props.liveTranscript}\n slotProps={slotProps}\n statuses={statuses}\n sessionToolRenderer={sessionToolRenderer}\n onMessageActions={messageActions.length ? setActionTarget : undefined}\n markdown={props.markdown}\n transcript={props.transcript}\n />\n )}\n {props.liveTranscript ? (\n <LiveActivity sessionId={sessionId} error={error} showsWork={props.transcript?.showsWork} />\n ) : (\n <ActivityPanel status={props.transcript?.showsWork?.(entries) ? undefined : activity} error={error} />\n )}\n {offline && !props.readOnly && !stopped ? (\n <View style={styles.offline} accessibilityLiveRegion=\"polite\">\n <Text style={styles.offlineText}>Po on your computer is not connected. Your message is kept.</Text>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n loading={offline.restoring ?? false}\n loadingLabel=\"Restoring the connection\"\n onPress={offline.onRestore}\n >\n Restore\n </Button>\n </View>\n ) : null}\n {asking ? (\n // ponytail: a fixed share of the screen keeps the transcript visible; the prompt scrolls inside it.\n <View style={[styles.promptDock, !composerShown && styles.promptInset]}>\n {props.promptError ? (\n <Text style={styles.promptError} accessibilityRole=\"alert\">\n {props.promptError}\n </Text>\n ) : null}\n {asking}\n </View>\n ) : null}\n {props.contextItems?.length && (props.panel === undefined || props.retainComposer) ? (\n <View style={styles.contextItems}>\n {props.contextItems.map((item) => (\n <Button\n key={`${item.source}:${item.id}`}\n variant=\"ghost\"\n size=\"sm\"\n accessibilityLabel={`Remove ${item.label}`}\n onPress={() => props.onRemoveContext?.(item.source, item.id)}\n >\n {item.label} ×\n </Button>\n ))}\n </View>\n ) : null}\n {!props.readOnly && stopped ? (\n <View style={styles.stopped}>\n <Text style={styles.stoppedTitle}>Session stopped</Text>\n <Text style={styles.stoppedText}>\n Review the conversation above, then wake to continue.\n {stopped.folder ? ` History is on disk in ${stopped.folder}.` : ' Your history is saved.'}\n </Text>\n {stopped.error ? (\n <Text style={styles.stoppedError} accessibilityRole=\"alert\">\n {stopped.error}\n </Text>\n ) : null}\n <Button variant=\"primary\" size=\"md\" loading={stopped.waking} loadingLabel=\"Waking\" onPress={stopped.onWake}>\n Wake session\n </Button>\n </View>\n ) : composerShown ? (\n <Composer\n {...composer}\n onSend={onSend}\n disabled={Boolean(ask)}\n value={props.draftStore ? undefined : (props.draft ?? drafts[sessionId] ?? composer?.initialText ?? '')}\n onChangeText={props.draftStore ? undefined : updateDraft}\n draftStore={props.draftStore}\n sessionId={sessionId}\n slotProps={slotProps}\n />\n ) : null}\n <MessageActionsSheet\n sessionId={sessionId}\n message={actionTarget}\n actions={messageActions}\n onClose={() => setActionTarget(undefined)}\n />\n {!props.readOnly &&\n slotFills(HOST_SLOTS.overlay, sessionId).map(({ pluginId, id, component: Overlay }) =>\n Overlay ? <Overlay key={`${pluginId}:${id}`} {...slotProps} /> : null,\n )}\n </View>\n );\n}\n\n/** A plugin renderer reads result images inline, so one the transcript sent by reference is filled in once read. */\nfunction PluginToolMessage<P extends { result: ToolResultView | null }>({\n message: Message,\n props,\n}: {\n message: ComponentType<P>;\n props: P;\n}) {\n const result = useImageRefs(props.result);\n return <Message {...props} result={result} />;\n}\nfunction LiveActivity({\n sessionId,\n error,\n showsWork,\n}: {\n sessionId: string;\n error?: string;\n showsWork?: SessionTranscript['showsWork'];\n}) {\n const mapEntry = useMemo(createNativeEntryMapper, []);\n // Entries are mapped only for a template that asks; the default screen reads the flag alone.\n const working = useStore(\n sessionStoreFor(sessionId),\n (state) => state.streaming && !showsWork?.(state.entries.flatMap(mapEntry)),\n );\n return <ActivityPanel status={working ? 'Working...' : undefined} error={error} />;\n}\n\nconst SessionTimeline = memo(function SessionTimeline({\n sessionId,\n entries,\n live,\n slotProps,\n statuses,\n sessionToolRenderer,\n onMessageActions,\n markdown,\n transcript,\n}: {\n sessionId: string;\n entries: readonly TimelineEntry[];\n live?: boolean;\n slotProps: WebPluginSlotProps;\n statuses: Readonly<Record<string, string>>;\n sessionToolRenderer?: SessionScreenProps['sessionToolRenderer'];\n onMessageActions?: (entry: TimelineEntry) => void;\n markdown?: SessionScreenProps['markdown'];\n transcript?: SessionTranscript;\n}) {\n const raw = useStore(sessionStoreFor(sessionId), (state) => (live ? state.entries : undefined));\n const mapEntry = useMemo(createNativeEntryMapper, []);\n const groupTools = useMemo(() => (transcript?.createGrouper ?? createToolGrouper)(), [transcript]);\n const data = useMemo(\n () => groupTools(raw === undefined ? entries : raw.flatMap(mapEntry)),\n [raw, entries, mapEntry, groupTools],\n );\n const registryVersion = useRegistryVersion();\n const renderTool = useCallback(\n (entry: TimelineEntry): ReactNode | null => {\n const toolName = entry.toolName;\n const tool = entry.payload as ToolPayload | undefined;\n if (!toolName || !tool) return null;\n const Message = sessionToolRenderer?.(sessionId, toolName, statuses, tool.result?.details)?.message;\n if (!Message) return null;\n // Another tool's own card for a call made on this one's behalf, as the web's nestedToolCard. Null when no\n // plugin claims the tool; the nested card gets no renderTool, so nesting stops at one level.\n const nested: NonNullable<ToolMessageRenderProps['renderTool']> = (call) => {\n const Nested = sessionToolRenderer?.(sessionId, call.toolName, statuses, call.result?.details)?.message;\n if (!Nested) return null;\n const output = (call.result?.content ?? [])\n .flatMap((item) => {\n const block = item as { type?: unknown; text?: unknown };\n return block.type === 'text' && typeof block.text === 'string' ? [block.text] : [];\n })\n .join('\\n');\n return (\n <ToolRendererBoundary toolName={call.toolName}>\n {(nestedFailed) =>\n nestedFailed ? (\n <Text selectable>{output}</Text>\n ) : (\n <PluginToolMessage\n message={Nested}\n props={{\n ...slotProps,\n toolCallId: `${tool.toolCallId}:${call.toolName}`,\n toolName: call.toolName,\n args: call.args,\n result: call.result,\n output,\n running: false,\n isError: call.isError,\n }}\n />\n )\n }\n </ToolRendererBoundary>\n );\n };\n return (\n <ToolRendererBoundary key={entry.id} toolName={toolName}>\n {(failed) =>\n failed ? (\n <TimelineItem entry={entry} />\n ) : (\n <PluginToolMessage message={Message} props={{ ...slotProps, toolName, ...tool, renderTool: nested }} />\n )\n }\n </ToolRendererBoundary>\n );\n },\n [sessionId, statuses, slotProps, sessionToolRenderer, registryVersion],\n );\n const renderItem = useCallback(\n (entry: TimelineEntry) => {\n const builtIn = (item: TimelineEntry) => (\n <MemoTimelineItem\n entry={item}\n renderTool={renderTool}\n onMessageActions={onMessageActions}\n markdown={markdown}\n />\n );\n return transcript ? transcript.renderItem(entry, builtIn, slotProps) : builtIn(entry);\n },\n [renderTool, onMessageActions, markdown, transcript, slotProps],\n );\n return (\n <ImageRefScope value={sessionId}>\n <List\n style={styles.list}\n startAtBottom\n separators={false}\n data={data}\n keyExtractor={entryKey}\n renderItem={renderItem}\n accessibilityLabel=\"Transcript\"\n />\n </ImageRefScope>\n );\n});\n\n/** Each transcript owns its cache; removed dashboard entries are only weakly referenced. */\nexport function createNativeEntryMapper(): (entry: DashboardEntry) => TimelineEntry[] {\n const cache = new WeakMap<DashboardEntry, TimelineEntry[]>();\n return (entry) => {\n let mapped = cache.get(entry);\n if (mapped === undefined) {\n mapped = nativeEntry(entry);\n cache.set(entry, mapped);\n }\n return mapped;\n };\n}\n\n/**\n * Folds each run of two or more consecutive tool calls into `tools` entries of\n * at most TOOL_GROUP_LIMIT calls, so one list cell never mounts a whole long\n * run. Chunks count from the run's start, so keys stay put as the run grows.\n * A group whose calls are unchanged keeps its object, so the memoised row and\n * the calls in it do not re-render while another entry streams.\n */\nexport function createToolGrouper(): (entries: readonly TimelineEntry[]) => TimelineEntry[] {\n let previous = new Map<string, TimelineEntry>();\n return (entries) => {\n const next = new Map<string, TimelineEntry>();\n const out: TimelineEntry[] = [];\n let run: TimelineEntry[] = [];\n const flush = () => {\n const first = run[0];\n if (first === undefined || run.length < 2) {\n out.push(...run);\n } else {\n const id = `tools:${first.id}`;\n const old = previous.get(id);\n const same = old?.calls?.length === run.length && run.every((call, index) => old.calls?.[index] === call);\n const group: TimelineEntry = same && old !== undefined ? old : { id, role: 'tools', text: '', calls: run };\n next.set(id, group);\n out.push(group);\n }\n run = [];\n };\n for (const entry of entries) {\n if (entry.role === 'tool') {\n run.push(entry);\n if (run.length === TOOL_GROUP_LIMIT) flush();\n } else {\n flush();\n out.push(entry);\n }\n }\n flush();\n previous = next;\n return out;\n };\n}\n\nconst styles = StyleSheet.create((theme, rt) => ({\n promptDock: { maxHeight: '70%' },\n // Clears the home indicator when no composer sits below; the keyboard covers that edge while it is open.\n promptInset: { paddingBottom: rt.insets.ime > 0 ? 0 : rt.insets.bottom },\n promptError: {\n paddingHorizontal: theme.spacing(4),\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.red,\n },\n contextItems: { flexDirection: 'row', flexWrap: 'wrap', paddingHorizontal: theme.spacing(3), gap: theme.spacing(2) },\n screen: {\n flex: 1,\n backgroundColor: theme.colors.bg,\n },\n list: {\n flex: 1,\n paddingVertical: theme.spacing(2),\n },\n stopped: {\n gap: theme.spacing(2),\n margin: theme.spacing(3),\n padding: theme.spacing(4),\n borderRadius: theme.borderRadius.lg,\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n },\n stoppedTitle: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n },\n stoppedText: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n stoppedError: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.red,\n },\n offline: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n },\n offlineText: {\n flex: 1,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.dim,\n },\n}));\n\n/** Maps dashboard transcript entries onto the native timeline; tool payload feeds plugin renderers. */\nexport function nativeEntry(entry: DashboardEntry): TimelineEntry[] {\n const at = entry.timestamp === undefined ? {} : { timestamp: entry.timestamp };\n switch (entry.kind) {\n case 'user':\n case 'queued':\n return [\n {\n id: entry.id,\n role: 'user',\n text: entry.text,\n ...(entry.images?.length ? { images: entry.images } : {}),\n ...at,\n },\n ];\n case 'assistant': {\n if (!entry.text) return [];\n const name = entry.identity?.name ?? entry.identity?.profile;\n const author = name === undefined ? {} : { author: { name, initials: personaInitials(name) } };\n return [{ id: entry.id, role: 'assistant', text: entry.text, ...author, ...at }];\n }\n case 'intercom':\n return [\n {\n id: entry.id,\n role: 'assistant',\n text: entry.text,\n author: { name: entry.name, initials: personaInitials(entry.name) },\n ...at,\n },\n ];\n case 'notice':\n return [{ id: entry.id, role: 'notice', text: entry.text, tone: entry.tone, ...at }];\n case 'settled':\n return [{ id: entry.id, role: 'settled', text: '', tools: entry.tools, ...at }];\n case 'tool':\n return [\n {\n id: entry.id,\n role: 'tool',\n toolName: entry.name,\n text: entry.output || entry.argSummary,\n ...at,\n payload: {\n toolCallId: entry.toolCallId,\n args: entry.args,\n result: entry.result,\n output: entry.output,\n running: entry.running,\n isError: entry.isError,\n },\n },\n ];\n default:\n return [];\n }\n}\n\n/** Host-owned native transcript adapters, using the same session/thread folds as the conversation. */\nexport function NativeTranscript({\n sessionId,\n threadId,\n options,\n markdown,\n}: {\n sessionId: string;\n threadId?: string;\n options?: ThreadViewOptions;\n markdown?: Pick<MarkdownProps, 'loadImage' | 'onFileLink'>;\n}) {\n useRenderTrace('NativeTranscript');\n useEffect(() => {\n if (threadId !== undefined) {\n subscribeThread(sessionId, threadId);\n return () => unsubscribeThread(sessionId, threadId);\n }\n // A transcript shown outside focus keeps its session's extension channels.\n return holdSessionChannels(sessionId);\n }, [sessionId, threadId]);\n const key = threadId === undefined ? sessionId : threadStoreKey(sessionId, threadId);\n const raw = useStore(sessionStoreFor(key), (state) => state.entries);\n const mapEntry = useMemo(createNativeEntryMapper, []);\n const entries = useMemo(() => raw.flatMap(mapEntry), [raw, mapEntry]);\n const limit = options?.limit;\n const visible = useMemo(\n () => (limit === undefined ? entries : limit <= 0 ? [] : entries.slice(-limit)),\n [entries, limit],\n );\n const renderItem = useCallback(\n (entry: TimelineEntry) => <MemoTimelineItem entry={entry} markdown={markdown} />,\n [markdown],\n );\n return (\n <ImageRefScope value={key}>\n <List\n data={visible}\n keyExtractor={entryKey}\n renderItem={renderItem}\n separators={false}\n accessibilityLabel=\"Transcript\"\n />\n </ImageRefScope>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoDA,MAAMoD,mBAAmB;AACzB,MAAMC,gBAA0C,CAAA;AAChD,MAAMC,iBAAmD,CAAC;AAC1D,MAAMG,mBAAmBtB,KAAKgB,YAAY;AAC1C,MAAMO,YAAYC,UAAyBA,MAAMC;;AAEjD,MAAMC,mBAAmB;;AAuCzB,SAASmB,qBAA6B;CACpC,MAAM,CAACC,SAASC,QAAQzC,YAAY0C,UAAkBA,QAAQ,GAAG,CAAC;CAClE5C,gBAAgB1B,2BAA2BqE,IAAI,GAAG,CAAA,CAAE;CACpD,OAAOD;AACT;AAEA,SAAgBG,cAAcC,OAA2B;CACvDrD,eAAe,eAAe;CAC9B,MAAM,EACJsD,WACAhB,UAAUjB,eACVkC,QACAC,q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ativeTemplateSessionProps","ToolMessageRenderProps","ToolResultView","ThreadViewOptions","WebPluginSlotProps","Button","fontOf","List","MarkdownProps","Tabs","TabsList","TabsTrigger","ImageRefScope","subscribeWebPluginRegistry","personaInitials","sessionStoreFor","subscribeThread","unsubscribeThread","threadStoreKey","holdSessionChannels","HOST_SLOTS","pluginUserMessageActions","renderRegion","slotFills","TimelineEntry","DashboardEntry","toolMessageProps","toolPromptClaim","ToolPromptInput","ToolRendererBoundary","useImageRefs","webTabs","useRenderTrace","useStore","ComponentType","memo","ReactElement","ReactNode","useCallback","useEffect","useMemo","useReducer","useState","AccessibilityInfo","StyleSheet","ActivityPanel","Composer","ComposerProps","DialogSheet","MessageActionsSheet","nativeSlotProps","TimelineItem","CONVERSATION_TAB","EMPTY_ENTRIES","EMPTY_STATUSES","Readonly","Record","MemoTimelineItem","entryKey","entry","id","TOOL_GROUP_LIMIT","ToolPayload","toolCallId","args","result","output","running","isError","SessionScreenProps","entries","composer","Omit","transcript","SessionTranscript","createGrouper","renderItem","builtIn","slotProps","showsWork","useRegistryVersion","version","bump","value","SessionScreen","props","sessionId","onSend","sessionToolRenderer","ask","onAnswer","onCancel","activity","error","stopped","offline","statuses","activeTab","setActiveTab","drafts","setDrafts","actionTarget","setActionTarget","messageActions","updateDraft","onDraftChange","text","current","tabId","addition","trim","draft","initialText","separator","test","pluginTabs","tabs","label","map","ActivePanel","find","tab","panel","prompt","readOnly","promptInput","fallbackAsk","dialogValue","onDialogValueChange","asking","dialog","name","failed","askingId","undefined","askingTitle","title","announceForAccessibility","emptyRegion","length","emptyStateRegion","composerShown","retainComposer","styles","screen","list","liveTranscript","markdown","offlineText","restoring","onRestore","promptDock","promptInset","promptError","contextItems","item","source","onRemoveContext","stoppedTitle","stoppedText","folder","stoppedError","waking","onWake","Boolean","draftStore","overlay","pluginId","component","Overlay","PluginToolMessage","message","Message","P","TemplateItem","render","LiveActivity","mapEntry","createNativeEntryMapper","working","state","streaming","flatMap","SessionTimeline","live","onMessageActions","raw","groupTools","createToolGrouper","data","registryVersion","renderTool","toolName","tool","payload","details","nested","NonNullable","call","Nested","content","block","type","join","nestedFailed","cache","WeakMap","mapped","get","nativeEntry","set","previous","Map","next","out","run","flush","first","push","old","same","calls","every","index","group","role","create","theme","rt","maxHeight","paddingBottom","insets","ime","bottom","uni__dependencies","paddingHorizontal","spacing","fontFamily","sans","fontSize","sm","lineHeight","color","colors","red","flexDirection","flexWrap","gap","flex","backgroundColor","bg","paddingVertical","margin","padding","borderRadius","lg","borderWidth","borderColor","base","fontWeight","semibold","hi","lineHeightRelaxed","dim","alignItems","paddingLeft","paddingRight","at","timestamp","kind","images","identity","profile","author","initials","tone","tools","argSummary","NativeTranscript","threadId","options","Pick","key","limit","visible","slice"],"sources":["../../src/screens/SessionScreen.tsx"],"sourcesContent":["import type { NativeTemplateSessionProps } from '@agimon-ai/po-core/native';\nimport type {\n ToolMessageRenderProps,\n ToolResultView,\n ThreadViewOptions,\n WebPluginSlotProps,\n} from '@agimon-ai/po-core/web';\nimport { Button, fontOf, List, type MarkdownProps, Tabs, TabsList, TabsTrigger } from '@agimon-ai/po-native-components';\nimport {\n ImageRefScope,\n subscribeWebPluginRegistry,\n personaInitials,\n sessionStoreFor,\n subscribeThread,\n unsubscribeThread,\n threadStoreKey,\n holdSessionChannels,\n HOST_SLOTS,\n pluginUserMessageActions,\n renderRegion,\n slotFills,\n type TimelineEntry as DashboardEntry,\n toolMessageProps,\n toolPromptClaim,\n type ToolPromptInput,\n ToolRendererBoundary,\n useImageRefs,\n webTabs,\n useRenderTrace,\n} from '@agimon-ai/po-web-dashboard/core';\nimport { useStore } from '@tanstack/react-store';\nimport {\n type ComponentType,\n memo,\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useReducer,\n useState,\n} from 'react';\nimport { AccessibilityInfo, Text, View } from 'react-native';\nimport { StyleSheet } from 'react-native-unistyles';\n\nimport { ActivityPanel } from '../components/ActivityPanel';\nimport { Composer, type ComposerProps } from '../components/Composer';\nimport { DialogSheet } from '../components/DialogSheet';\nimport { MessageActionsSheet } from '../components/MessageActionsSheet';\nimport { nativeSlotProps } from '../components/slotProps';\nimport { type TimelineEntry, TimelineItem } from '../components/TimelineItem';\n\nconst CONVERSATION_TAB = 'conversation';\nconst EMPTY_ENTRIES: readonly TimelineEntry[] = [];\nconst EMPTY_STATUSES: Readonly<Record<string, string>> = {};\nconst MemoTimelineItem = memo(TimelineItem);\nconst entryKey = (entry: TimelineEntry) => entry.id;\n/** The most tool calls one transcript cell holds; a longer run splits into several groups. */\nconst TOOL_GROUP_LIMIT = 20;\n\n/** The tool entry fields a plugin renderer reads, carried as TimelineEntry.payload. */\nexport interface ToolPayload {\n toolCallId: string;\n args: Record<string, unknown>;\n result: ToolResultView | null;\n output: string;\n running: boolean;\n isError: boolean;\n}\n\n/**\n * The app's session contract plus the presentation hooks a template may add. Every addition is\n * optional, so a template screen typed with these props still accepts what the app hands it.\n */\nexport interface SessionScreenProps extends NativeTemplateSessionProps {\n entries?: readonly TimelineEntry[];\n /** Options and run controls for the composer row. */\n composer?: Omit<ComposerProps, 'onSend' | 'disabled' | 'value' | 'onChangeText'>;\n /** Lets a template regroup and redraw transcript rows; absent keeps the built-in tool groups and rows. */\n transcript?: SessionTranscript;\n}\n\nexport interface SessionTranscript {\n /** Called once per transcript, so the grouper can keep unchanged groups by identity between renders. */\n createGrouper: () => (entries: readonly TimelineEntry[]) => TimelineEntry[];\n /**\n * `entry` arrives with images the transcript sent by reference filled in once read.\n * `builtIn` draws one entry the default way, with plugin tool cards, for rows the template keeps.\n */\n renderItem: (\n entry: TimelineEntry,\n builtIn: (entry: TimelineEntry) => ReactElement,\n /** The session's slot props, for a row that opens plugin surfaces such as Author. */\n slotProps: WebPluginSlotProps,\n ) => ReactElement | null;\n /** True when a row already shows the turn at work, so the screen leaves out its own Working line. */\n showsWork?: (entries: readonly TimelineEntry[]) => boolean;\n}\n\n/** Re-renders when plugin installs change what the registry resolves. */\nfunction useRegistryVersion(): number {\n const [version, bump] = useReducer((value: number) => value + 1, 0);\n useEffect(() => subscribeWebPluginRegistry(bump), []);\n return version;\n}\n\nexport function SessionScreen(props: SessionScreenProps) {\n useRenderTrace('SessionScreen');\n const {\n sessionId,\n entries = EMPTY_ENTRIES,\n onSend,\n sessionToolRenderer,\n ask,\n onAnswer,\n onCancel,\n activity,\n error,\n composer,\n stopped,\n offline,\n } = props;\n const statuses = props.statuses ?? EMPTY_STATUSES;\n const [activeTab, setActiveTab] = useState(CONVERSATION_TAB);\n const [drafts, setDrafts] = useState<Record<string, string>>({});\n const [actionTarget, setActionTarget] = useState<TimelineEntry>();\n const messageActions = pluginUserMessageActions();\n const updateDraft =\n props.onDraftChange ?? ((text: string) => setDrafts((current) => ({ ...current, [sessionId]: text })));\n useRegistryVersion();\n const slotProps =\n props.slotProps ??\n nativeSlotProps(\n sessionId,\n statuses,\n (tabId) => setActiveTab(tabId ?? CONVERSATION_TAB),\n (text) => {\n const addition = text.trim();\n if (!addition) return;\n setDrafts((current) => {\n const draft = current[sessionId] ?? composer?.initialText ?? '';\n const separator = draft === '' || /\\s$/.test(draft) ? '' : ' ';\n return { ...current, [sessionId]: `${draft}${separator}${addition}` };\n });\n },\n );\n const pluginTabs = webTabs(sessionId);\n const tabs = [{ id: CONVERSATION_TAB, label: 'Conversation' }, ...pluginTabs.map(({ id, label }) => ({ id, label }))];\n const ActivePanel = pluginTabs.find((tab) => tab.id === activeTab)?.panel;\n const prompt =\n !props.readOnly && props.promptInput && onAnswer && onCancel\n ? // The app builds it from the dashboard's own session state, so the contract's wide shape narrows back.\n toolPromptClaim(props.promptInput as ToolPromptInput, null, sessionId)\n : null;\n const fallbackAsk =\n !props.readOnly && ask && onAnswer ? (\n <DialogSheet\n ask={ask}\n onAnswer={onAnswer}\n onCancel={onCancel}\n value={props.dialogValue}\n onChangeValue={props.onDialogValueChange}\n />\n ) : null;\n const asking =\n prompt && onAnswer && onCancel ? (\n <ToolRendererBoundary key={`${sessionId}:${prompt.dialog.id}`} toolName={prompt.entry?.name ?? 'dialog'}>\n {(failed) =>\n failed ? (\n fallbackAsk\n ) : prompt.entry ? (\n <prompt.prompt.component\n {...toolMessageProps(slotProps, prompt.entry, statuses)}\n dialog={prompt.dialog}\n answer={(value) => onAnswer(prompt.dialog.id, value)}\n cancel={() => onCancel(prompt.dialog.id)}\n />\n ) : (\n <prompt.prompt.component\n {...slotProps}\n dialog={prompt.dialog}\n answer={(value) => onAnswer(prompt.dialog.id, value)}\n cancel={() => onCancel(prompt.dialog.id)}\n />\n )\n }\n </ToolRendererBoundary>\n ) : (\n fallbackAsk\n );\n const askingId = asking === null ? undefined : (prompt?.dialog.id ?? ask?.id);\n const askingTitle = prompt?.dialog.title ?? ask?.title;\n // Screen readers hear a question once when it arrives, not on every re-render.\n useEffect(() => {\n if (askingId !== undefined)\n AccessibilityInfo.announceForAccessibility(`Po is asking: ${askingTitle ?? 'a question'}`);\n }, [askingId, askingTitle]);\n // An empty conversation a person's own package may fill on the phone; with no fill the list shows as before.\n const emptyRegion =\n entries.length === 0 ? renderRegion(HOST_SLOTS.emptyStateRegion, null, slotProps, sessionId) : null;\n const composerShown =\n !props.readOnly && !stopped && !prompt && (props.panel === undefined || props.retainComposer === true);\n return (\n <View style={styles.screen}>\n {!props.slotProps && tabs.length > 1 ? (\n <Tabs value={activeTab} onValueChange={setActiveTab}>\n <TabsList>\n {tabs.map((tab) => (\n <TabsTrigger key={tab.id} value={tab.id}>\n {tab.label}\n </TabsTrigger>\n ))}\n </TabsList>\n </Tabs>\n ) : null}\n {props.panel !== undefined ? (\n <View style={styles.list}>{props.panel}</View>\n ) : ActivePanel ? (\n <View style={styles.list}>\n <ActivePanel {...slotProps} />\n </View>\n ) : emptyRegion ? (\n <View style={styles.list}>{emptyRegion}</View>\n ) : (\n <SessionTimeline\n sessionId={sessionId}\n entries={entries}\n live={props.liveTranscript}\n slotProps={slotProps}\n statuses={statuses}\n sessionToolRenderer={sessionToolRenderer}\n onMessageActions={messageActions.length ? setActionTarget : undefined}\n markdown={props.markdown}\n transcript={props.transcript}\n />\n )}\n {props.liveTranscript ? (\n <LiveActivity sessionId={sessionId} error={error} showsWork={props.transcript?.showsWork} />\n ) : (\n <ActivityPanel status={props.transcript?.showsWork?.(entries) ? undefined : activity} error={error} />\n )}\n {offline && !props.readOnly && !stopped ? (\n <View style={styles.offline} accessibilityLiveRegion=\"polite\">\n <Text style={styles.offlineText}>Po on your computer is not connected. Your message is kept.</Text>\n <Button\n variant=\"ghost\"\n size=\"sm\"\n loading={offline.restoring ?? false}\n loadingLabel=\"Restoring the connection\"\n onPress={offline.onRestore}\n >\n Restore\n </Button>\n </View>\n ) : null}\n {asking ? (\n // ponytail: a fixed share of the screen keeps the transcript visible; the prompt scrolls inside it.\n <View style={[styles.promptDock, !composerShown && styles.promptInset]}>\n {props.promptError ? (\n <Text style={styles.promptError} accessibilityRole=\"alert\">\n {props.promptError}\n </Text>\n ) : null}\n {asking}\n </View>\n ) : null}\n {props.contextItems?.length && (props.panel === undefined || props.retainComposer) ? (\n <View style={styles.contextItems}>\n {props.contextItems.map((item) => (\n <Button\n key={`${item.source}:${item.id}`}\n variant=\"ghost\"\n size=\"sm\"\n accessibilityLabel={`Remove ${item.label}`}\n onPress={() => props.onRemoveContext?.(item.source, item.id)}\n >\n {item.label} ×\n </Button>\n ))}\n </View>\n ) : null}\n {!props.readOnly && stopped ? (\n <View style={styles.stopped}>\n <Text style={styles.stoppedTitle}>Session stopped</Text>\n <Text style={styles.stoppedText}>\n Review the conversation above, then wake to continue.\n {stopped.folder ? ` History is on disk in ${stopped.folder}.` : ' Your history is saved.'}\n </Text>\n {stopped.error ? (\n <Text style={styles.stoppedError} accessibilityRole=\"alert\">\n {stopped.error}\n </Text>\n ) : null}\n <Button variant=\"primary\" size=\"md\" loading={stopped.waking} loadingLabel=\"Waking\" onPress={stopped.onWake}>\n Wake session\n </Button>\n </View>\n ) : composerShown ? (\n <Composer\n {...composer}\n onSend={onSend}\n disabled={Boolean(ask)}\n value={props.draftStore ? undefined : (props.draft ?? drafts[sessionId] ?? composer?.initialText ?? '')}\n onChangeText={props.draftStore ? undefined : updateDraft}\n draftStore={props.draftStore}\n sessionId={sessionId}\n slotProps={slotProps}\n />\n ) : null}\n <MessageActionsSheet\n sessionId={sessionId}\n message={actionTarget}\n actions={messageActions}\n onClose={() => setActionTarget(undefined)}\n />\n {!props.readOnly &&\n slotFills(HOST_SLOTS.overlay, sessionId).map(({ pluginId, id, component: Overlay }) =>\n Overlay ? <Overlay key={`${pluginId}:${id}`} {...slotProps} /> : null,\n )}\n </View>\n );\n}\n\n/** A plugin renderer reads result images inline, so one the transcript sent by reference is filled in once read. */\nfunction PluginToolMessage<P extends { result: ToolResultView | null }>({\n message: Message,\n props,\n}: {\n message: ComponentType<P>;\n props: P;\n}) {\n const result = useImageRefs(props.result);\n return <Message {...props} result={result} />;\n}\n/** A template row reads images inline too, so it gets the entry with referenced images filled in. */\nfunction TemplateItem({\n entry,\n render,\n}: {\n entry: TimelineEntry;\n render: (entry: TimelineEntry) => ReactElement | null;\n}) {\n return render(useImageRefs(entry));\n}\nfunction LiveActivity({\n sessionId,\n error,\n showsWork,\n}: {\n sessionId: string;\n error?: string;\n showsWork?: SessionTranscript['showsWork'];\n}) {\n const mapEntry = useMemo(createNativeEntryMapper, []);\n // Entries are mapped only for a template that asks; the default screen reads the flag alone.\n const working = useStore(\n sessionStoreFor(sessionId),\n (state) => state.streaming && !showsWork?.(state.entries.flatMap(mapEntry)),\n );\n return <ActivityPanel status={working ? 'Working...' : undefined} error={error} />;\n}\n\nconst SessionTimeline = memo(function SessionTimeline({\n sessionId,\n entries,\n live,\n slotProps,\n statuses,\n sessionToolRenderer,\n onMessageActions,\n markdown,\n transcript,\n}: {\n sessionId: string;\n entries: readonly TimelineEntry[];\n live?: boolean;\n slotProps: WebPluginSlotProps;\n statuses: Readonly<Record<string, string>>;\n sessionToolRenderer?: SessionScreenProps['sessionToolRenderer'];\n onMessageActions?: (entry: TimelineEntry) => void;\n markdown?: SessionScreenProps['markdown'];\n transcript?: SessionTranscript;\n}) {\n const raw = useStore(sessionStoreFor(sessionId), (state) => (live ? state.entries : undefined));\n const mapEntry = useMemo(createNativeEntryMapper, []);\n const groupTools = useMemo(() => (transcript?.createGrouper ?? createToolGrouper)(), [transcript]);\n const data = useMemo(\n () => groupTools(raw === undefined ? entries : raw.flatMap(mapEntry)),\n [raw, entries, mapEntry, groupTools],\n );\n const registryVersion = useRegistryVersion();\n const renderTool = useCallback(\n (entry: TimelineEntry): ReactNode | null => {\n const toolName = entry.toolName;\n const tool = entry.payload as ToolPayload | undefined;\n if (!toolName || !tool) return null;\n const Message = sessionToolRenderer?.(sessionId, toolName, statuses, tool.result?.details)?.message;\n if (!Message) return null;\n // Another tool's own card for a call made on this one's behalf, as the web's nestedToolCard. Null when no\n // plugin claims the tool; the nested card gets no renderTool, so nesting stops at one level.\n const nested: NonNullable<ToolMessageRenderProps['renderTool']> = (call) => {\n const Nested = sessionToolRenderer?.(sessionId, call.toolName, statuses, call.result?.details)?.message;\n if (!Nested) return null;\n const output = (call.result?.content ?? [])\n .flatMap((item) => {\n const block = item as { type?: unknown; text?: unknown };\n return block.type === 'text' && typeof block.text === 'string' ? [block.text] : [];\n })\n .join('\\n');\n return (\n <ToolRendererBoundary toolName={call.toolName}>\n {(nestedFailed) =>\n nestedFailed ? (\n <Text selectable>{output}</Text>\n ) : (\n <PluginToolMessage\n message={Nested}\n props={{\n ...slotProps,\n toolCallId: `${tool.toolCallId}:${call.toolName}`,\n toolName: call.toolName,\n args: call.args,\n result: call.result,\n output,\n running: false,\n isError: call.isError,\n }}\n />\n )\n }\n </ToolRendererBoundary>\n );\n };\n return (\n <ToolRendererBoundary key={entry.id} toolName={toolName}>\n {(failed) =>\n failed ? (\n <TimelineItem entry={entry} />\n ) : (\n <PluginToolMessage message={Message} props={{ ...slotProps, toolName, ...tool, renderTool: nested }} />\n )\n }\n </ToolRendererBoundary>\n );\n },\n [sessionId, statuses, slotProps, sessionToolRenderer, registryVersion],\n );\n const renderItem = useCallback(\n (entry: TimelineEntry) => {\n const builtIn = (item: TimelineEntry) => (\n <MemoTimelineItem\n entry={item}\n renderTool={renderTool}\n onMessageActions={onMessageActions}\n markdown={markdown}\n />\n );\n return transcript ? (\n <TemplateItem entry={entry} render={(item) => transcript.renderItem(item, builtIn, slotProps)} />\n ) : (\n builtIn(entry)\n );\n },\n [renderTool, onMessageActions, markdown, transcript, slotProps],\n );\n return (\n <ImageRefScope value={sessionId}>\n <List\n style={styles.list}\n startAtBottom\n separators={false}\n data={data}\n keyExtractor={entryKey}\n renderItem={renderItem}\n accessibilityLabel=\"Transcript\"\n />\n </ImageRefScope>\n );\n});\n\n/** Each transcript owns its cache; removed dashboard entries are only weakly referenced. */\nexport function createNativeEntryMapper(): (entry: DashboardEntry) => TimelineEntry[] {\n const cache = new WeakMap<DashboardEntry, TimelineEntry[]>();\n return (entry) => {\n let mapped = cache.get(entry);\n if (mapped === undefined) {\n mapped = nativeEntry(entry);\n cache.set(entry, mapped);\n }\n return mapped;\n };\n}\n\n/**\n * Folds each run of two or more consecutive tool calls into `tools` entries of\n * at most TOOL_GROUP_LIMIT calls, so one list cell never mounts a whole long\n * run. Chunks count from the run's start, so keys stay put as the run grows.\n * A group whose calls are unchanged keeps its object, so the memoised row and\n * the calls in it do not re-render while another entry streams.\n */\nexport function createToolGrouper(): (entries: readonly TimelineEntry[]) => TimelineEntry[] {\n let previous = new Map<string, TimelineEntry>();\n return (entries) => {\n const next = new Map<string, TimelineEntry>();\n const out: TimelineEntry[] = [];\n let run: TimelineEntry[] = [];\n const flush = () => {\n const first = run[0];\n if (first === undefined || run.length < 2) {\n out.push(...run);\n } else {\n const id = `tools:${first.id}`;\n const old = previous.get(id);\n const same = old?.calls?.length === run.length && run.every((call, index) => old.calls?.[index] === call);\n const group: TimelineEntry = same && old !== undefined ? old : { id, role: 'tools', text: '', calls: run };\n next.set(id, group);\n out.push(group);\n }\n run = [];\n };\n for (const entry of entries) {\n if (entry.role === 'tool') {\n run.push(entry);\n if (run.length === TOOL_GROUP_LIMIT) flush();\n } else {\n flush();\n out.push(entry);\n }\n }\n flush();\n previous = next;\n return out;\n };\n}\n\nconst styles = StyleSheet.create((theme, rt) => ({\n promptDock: { maxHeight: '70%' },\n // Clears the home indicator when no composer sits below; the keyboard covers that edge while it is open.\n promptInset: { paddingBottom: rt.insets.ime > 0 ? 0 : rt.insets.bottom },\n promptError: {\n paddingHorizontal: theme.spacing(4),\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.red,\n },\n contextItems: { flexDirection: 'row', flexWrap: 'wrap', paddingHorizontal: theme.spacing(3), gap: theme.spacing(2) },\n screen: {\n flex: 1,\n backgroundColor: theme.colors.bg,\n },\n list: {\n flex: 1,\n paddingVertical: theme.spacing(2),\n },\n stopped: {\n gap: theme.spacing(2),\n margin: theme.spacing(3),\n padding: theme.spacing(4),\n borderRadius: theme.borderRadius.lg,\n borderWidth: 1,\n borderColor: theme.colors['border-soft'],\n },\n stoppedTitle: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.base,\n lineHeight: theme.lineHeight.base,\n fontWeight: theme.fontWeight.semibold,\n color: theme.colors.hi,\n },\n stoppedText: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.dim,\n },\n stoppedError: {\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeightRelaxed.sm,\n color: theme.colors.red,\n },\n offline: {\n flexDirection: 'row',\n alignItems: 'center',\n gap: theme.spacing(2),\n paddingLeft: theme.spacing(4),\n paddingRight: theme.spacing(2),\n },\n offlineText: {\n flex: 1,\n fontFamily: fontOf(theme.fontFamily.sans),\n fontSize: theme.fontSize.sm,\n lineHeight: theme.lineHeight.sm,\n color: theme.colors.dim,\n },\n}));\n\n/** Maps dashboard transcript entries onto the native timeline; tool payload feeds plugin renderers. */\nexport function nativeEntry(entry: DashboardEntry): TimelineEntry[] {\n const at = entry.timestamp === undefined ? {} : { timestamp: entry.timestamp };\n switch (entry.kind) {\n case 'user':\n case 'queued':\n return [\n {\n id: entry.id,\n role: 'user',\n text: entry.text,\n ...(entry.images?.length ? { images: entry.images } : {}),\n ...at,\n },\n ];\n case 'assistant': {\n if (!entry.text) return [];\n const name = entry.identity?.name ?? entry.identity?.profile;\n const author = name === undefined ? {} : { author: { name, initials: personaInitials(name) } };\n return [{ id: entry.id, role: 'assistant', text: entry.text, ...author, ...at }];\n }\n case 'intercom':\n return [\n {\n id: entry.id,\n role: 'assistant',\n text: entry.text,\n author: { name: entry.name, initials: personaInitials(entry.name) },\n ...at,\n },\n ];\n case 'notice':\n return [{ id: entry.id, role: 'notice', text: entry.text, tone: entry.tone, ...at }];\n case 'settled':\n return [{ id: entry.id, role: 'settled', text: '', tools: entry.tools, ...at }];\n case 'tool':\n return [\n {\n id: entry.id,\n role: 'tool',\n toolName: entry.name,\n text: entry.output || entry.argSummary,\n ...at,\n payload: {\n toolCallId: entry.toolCallId,\n args: entry.args,\n result: entry.result,\n output: entry.output,\n running: entry.running,\n isError: entry.isError,\n },\n },\n ];\n default:\n return [];\n }\n}\n\n/** Host-owned native transcript adapters, using the same session/thread folds as the conversation. */\nexport function NativeTranscript({\n sessionId,\n threadId,\n options,\n markdown,\n}: {\n sessionId: string;\n threadId?: string;\n options?: ThreadViewOptions;\n markdown?: Pick<MarkdownProps, 'loadImage' | 'onFileLink'>;\n}) {\n useRenderTrace('NativeTranscript');\n useEffect(() => {\n if (threadId !== undefined) {\n subscribeThread(sessionId, threadId);\n return () => unsubscribeThread(sessionId, threadId);\n }\n // A transcript shown outside focus keeps its session's extension channels.\n return holdSessionChannels(sessionId);\n }, [sessionId, threadId]);\n const key = threadId === undefined ? sessionId : threadStoreKey(sessionId, threadId);\n const raw = useStore(sessionStoreFor(key), (state) => state.entries);\n const mapEntry = useMemo(createNativeEntryMapper, []);\n const entries = useMemo(() => raw.flatMap(mapEntry), [raw, mapEntry]);\n const limit = options?.limit;\n const visible = useMemo(\n () => (limit === undefined ? entries : limit <= 0 ? [] : entries.slice(-limit)),\n [entries, limit],\n );\n const renderItem = useCallback(\n (entry: TimelineEntry) => <MemoTimelineItem entry={entry} markdown={markdown} />,\n [markdown],\n );\n return (\n <ImageRefScope value={key}>\n <List\n data={visible}\n keyExtractor={entryKey}\n renderItem={renderItem}\n separators={false}\n accessibilityLabel=\"Transcript\"\n />\n </ImageRefScope>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAoDA,MAAMoD,mBAAmB;AACzB,MAAMC,gBAA0C,CAAA;AAChD,MAAMC,iBAAmD,CAAC;AAC1D,MAAMG,mBAAmBtB,KAAKgB,YAAY;AAC1C,MAAMO,YAAYC,UAAyBA,MAAMC;;AAEjD,MAAMC,mBAAmB;;AA0CzB,SAASmB,qBAA6B;CACpC,MAAM,CAACC,SAASC,QAAQzC,YAAY0C,UAAkBA,QAAQ,GAAG,CAAC;CAClE5C,gBAAgB1B,2BAA2BqE,IAAI,GAAG,CAAA,CAAE;CACpD,OAAOD;AACT;AAEA,SAAgBG,cAAcC,OAA2B;CACvDrD,eAAe,eAAe;CAC9B,MAAM,EACJsD,WACAhB,UAAUjB,eACVkC,QACAC,qBACAC,KACAC,UACAC,UACAC,UACAC,OACAtB,UACAuB,SACAC,YACEV;CACJ,MAAMW,WAAWX,MAAMW,YAAY1C;CACnC,MAAM,CAAC2C,WAAWC,gBAAgBxD,SAASU,gBAAgB;CAC3D,MAAM,CAAC+C,QAAQC,aAAa1D,SAAiC,CAAC,CAAC;CAC/D,MAAM,CAAC2D,cAAcC,mBAAmB5D,SAAwB;CAChE,MAAM6D,iBAAiBlF,yBAAyB;CAChD,MAAMmF,cACJnB,MAAMoB,mBAAmBC,SAAiBN,WAAWO,aAAa;EAAE,GAAG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;;AAGA,SAAgBkN,iBAAiB,EAC/BhM,WACAiM,UACAC,SACArI,YAMC;CACDnH,eAAe,kBAAkB;CACjCO,gBAAgB;EACd,IAAIgP,aAAajJ,QAAW;GAC1BtH,gBAAgBsE,WAAWiM,QAAQ;GACnC,aAAatQ,kBAAkBqE,WAAWiM,QAAQ;EACpD;EAEA,OAAOpQ,oBAAoBmE,SAAS;CACtC,GAAG,CAACA,WAAWiM,QAAQ,CAAC;CACxB,MAAMG,MAAMH,aAAajJ,SAAYhD,YAAYpE,eAAeoE,WAAWiM,QAAQ;CACnF,MAAM7F,MAAMzJ,SAASlB,gBAAgB2Q,GAAG,IAAItG,UAAUA,MAAM9G,OAAO;CACnE,MAAM2G,WAAWzI,QAAQ0I,yBAAyB,CAAA,CAAE;CACpD,MAAM5G,UAAU9B,cAAckJ,IAAIJ,QAAQL,QAAQ,GAAG,CAACS,KAAKT,QAAQ,CAAC;CACpE,MAAM0G,QAAQH,SAASG;CACvB,MAAMC,UAAUpP,cACPmP,UAAUrJ,SAAYhE,UAAUqN,SAAS,IAAI,CAAA,IAAKrN,QAAQuN,MAAM,CAACF,KAAK,GAC7E,CAACrN,SAASqN,KAAK,CACjB;CACA,MAAM/M,aAAatC,aAChBqB,UAAyB,oBAAC,kBAAD;EAAyBA;EAAiBwF;CAAS,IAC7E,CAACA,QAAQ,CACX;CACA,OACE,oBAAC,eAAD;EAAe,OAAOuI;YACpB,oBAAC,MAAD;GACE,MAAME;GACN,cAAclO;GACFkB;GACZ,YAAY;GACZ,oBAAmB;EAAY;CAEpB;AAEnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/po-native-dashboard",
|
|
3
|
-
"version": "0.0.0-alpha.
|
|
3
|
+
"version": "0.0.0-alpha.6",
|
|
4
4
|
"description": "Shared React Native session views for Po native templates: transcript, composer and session sheets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -43,14 +43,14 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@agimon-ai/po-core": "0.0.0-alpha.
|
|
47
|
-
"@agimon-ai/po-native-components": "0.0.0-alpha.
|
|
48
|
-
"@agimon-ai/po-web-dashboard": "0.0.0-alpha.
|
|
46
|
+
"@agimon-ai/po-core": "0.0.0-alpha.134",
|
|
47
|
+
"@agimon-ai/po-native-components": "0.0.0-alpha.134",
|
|
48
|
+
"@agimon-ai/po-web-dashboard": "0.0.0-alpha.134"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
|
-
"@agimon-ai/po-build": "0.0.0-alpha.
|
|
52
|
-
"@agimon-ai/po-web-components": "0.0.0-alpha.
|
|
53
|
-
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.
|
|
51
|
+
"@agimon-ai/po-build": "0.0.0-alpha.134",
|
|
52
|
+
"@agimon-ai/po-web-components": "0.0.0-alpha.134",
|
|
53
|
+
"@agimon-ai/vibe-lint-plugin-po-core": "0.0.0-alpha.134",
|
|
54
54
|
"@tanstack/react-store": "0.11.2",
|
|
55
55
|
"@tanstack/store": "0.11.2",
|
|
56
56
|
"@types/node": "26.6.5",
|