fix(web): subagent lists in the composer banner no longer start lines with a comma (#19170)

This commit is contained in:
oliver authored and GitHub committed 2026-10-14 17:49:18 +00:00
1 parent 7897a695e3
commit e093789dd2
3 files changed
+41 -26

No files matched your search

@@ -9,7 +9,7 @@ import type {
ServerProvider,
} from "@t3tools/contracts";
import { Atom } from "effect/reactivity";
import { Fragment, useMemo } from "react";
import { useMemo } from "react";
import { Alert, Pressable, View, type ColorValue } from "react-native";
import { AppText as Text } from "../../components/AppText";
import { SymbolView } from "../../components/AppSymbol";
@@ -76,14 +76,17 @@ export function ThreadHandoffDivider(props: {
>
<View className="flex-row flex-wrap items-center justify-center gap-1.5">
{endpoints.from.map((endpoint, index) => (
<Fragment key={`${endpoint.instanceId}:${endpoint.model ?? ""}`}>
{index > 0 ? (
<View
key={`${endpoint.instanceId}:${endpoint.model ?? ""}`}
className="max-w-full flex-row items-center"
>
<HandoffEndpoint {...endpoint} providers={config?.providers ?? []} />
{index < endpoints.from.length - 1 ? (
<Text accessible={false} className="text-xs text-foreground-muted">
,
</Text>
) : null}
<HandoffEndpoint {...endpoint} providers={config?.providers ?? []} />
</Fragment>
</View>
))}
{endpoints.from.length > 0 ? (
<SymbolView name="arrow.right" size={12} tintColor={props.iconColor} />
+23 -13
View File
@@ -7472,10 +7472,13 @@ export default function ChatView(props: ChatViewProps) {
: `${childThreadInputs.length} subagents need input`,
description: childThreadInputs.map((child, index) => (
<Fragment key={child.id}>
{index > 0 ? ", " : null}
<InlineButton tone="muted" onClick={() => onOpenRelatedThread(child.id)}>
{child.title}
</InlineButton>
{index > 0 ? " " : null}
<span className="whitespace-nowrap">
<InlineButton tone="muted" onClick={() => onOpenRelatedThread(child.id)}>
{child.title}
</InlineButton>
{index < childThreadInputs.length - 1 ? "," : null}
</span>
</Fragment>
)),
actions: (
@@ -7643,19 +7646,26 @@ export default function ChatView(props: ChatViewProps) {
? undefined
: presentation.items.map((item, index) => {
const childThreadId = item.childThreadId;
const separator = index < presentation.items.length - 1 ? "," : null;
return (
<Fragment key={item.taskId}>
{index > 0 ? ", " : null}
{index > 0 ? " " : null}
{childThreadId === undefined ? (
item.label
) : (
<InlineButton
tone="muted"
aria-label={`Open subagent ${item.label}`}
onClick={() => onOpenRelatedThread(childThreadId)}
>
<>
{item.label}
</InlineButton>
{separator}
</>
) : (
<span className="whitespace-nowrap">
<InlineButton
tone="muted"
aria-label={`Open subagent ${item.label}`}
onClick={() => onOpenRelatedThread(childThreadId)}
>
{item.label}
</InlineButton>
{separator}
</span>
)}
</Fragment>
);
@@ -15,7 +15,6 @@ import {
type HandoffEndpoints,
type HandoffTimelineRun,
} from "@t3tools/client-runtime/handoff";
import { Fragment } from "react";
import { formatSubagentDisplayTitle } from "@t3tools/client-runtime/state/subagent-display";
import {
ProviderDriverKind,
@@ -562,18 +561,21 @@ export function HandoffRow(props: {
detail={
<span className="inline-flex min-w-0 flex-wrap items-center justify-center gap-1.5">
{fromEndpoints.map((endpoint, index) => (
<Fragment key={`${endpoint.instanceId}:${endpoint.model ?? ""}`}>
{index > 0 ? (
<span aria-hidden="true" className="-ml-1">
,
</span>
) : null}
<span
key={`${endpoint.instanceId}:${endpoint.model ?? ""}`}
className="inline-flex min-w-0 items-center"
>
<HandoffEndpoint
providers={props.providers}
instanceId={endpoint.instanceId}
model={endpoint.model}
/>
</Fragment>
{index < fromEndpoints.length - 1 ? (
<span aria-hidden="true" className="ml-0.5">
,
</span>
) : null}
</span>
))}
{fromEndpoints.length > 0 ? (
<ArrowRightIcon aria-hidden="true" className="size-3 shrink-0" />