Open source Grok Bot alternative, Bring your own agent and subscription: message Claude Code, Codex, Gemini CLI, Cursor, Copilot and 40+ AI agents as bots on your own computer, from iPhone, Mac, Windows, Linux or terminal. Agent-agnostic and free. Also a Muse and Dots alternative. Built in Rust.
Rust acpagent-client-protocolai-agentsai-assistantclaudeclaude-codecodexcoding-agentscursorgeminigemini-cligrok-bot-alternativeiosiphonelinuxmacosmcpopen-sourcerustself-hosted
feat: make thinking details an opt-in setting
leepokai9d07f3983fa5
diff --git a/apps/android/WhatsNew.md b/apps/android/WhatsNew.mdindex e978f9fb..63e86194 100644--- a/apps/android/WhatsNew.md+++ b/apps/android/WhatsNew.md@@ -16,7 +16,7 @@ else a generic "Bug fixes and improvements" line. Delete old sections.- Bot 之間交辦工作不必等待,對方的回覆會回到發問的 Bot,再由它回覆你。- 帳號選單裡的「電腦與設定」和它打開的頁面同名。- 新增聯結器失敗後再試一次,會使用你改好的金鑰。-- Bot 工作中點一下狀態膠囊,就能在對話裡展開這一輪的思考、工具與 MCP 呼叫,太長時在膠囊內捲動。+- 在設定開啟「顯示思考細節」後,點一下工作中 Bot 的狀態膠囊,就能展開這一輪的思考與步驟。- 點對話上方的 Bot 會打開它的詳情、資料庫與設定;「新會話」改到 Bot 列表的長按選單。### en-US@@ -26,5 +26,5 @@ else a generic "Bug fixes and improvements" line. Delete old sections.- Bots hand work to each other without waiting.- Computers & settings now matches the page it opens.- Retrying a failed connector uses the corrected key.-- Tap a working bot's status pill to see this turn's steps.+- Settings › Show thinking details unfolds a bot's steps.- Tap a chat's title for the bot's details; New session moved to the list's touch & hold menu.diff --git a/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt b/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.ktindex ceb075ef..617b12c6 100644--- a/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt+++ b/apps/android/app/src/androidTest/kotlin/com/codync/android/WorkingIndicatorTest.kt@@ -29,7 +29,7 @@ class WorkingIndicatorTest {@Test fun stepsUnfoldFromTheActivity() {compose.mainClock.autoAdvance = falseval step = Entry("tool", 0, "bot", 1, "tool", 1, buildJsonObject { put("title", "npm test"); put("status", "in_progress") })- compose.setContent { Hosted { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = "Terminal"), listOf(step)) } }+ compose.setContent { Hosted { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = "Terminal"), listOf(step), details = true) } }compose.mainClock.advanceTimeBy(1000)compose.onNodeWithText("npm test").assertDoesNotExist()compose.onNodeWithText("Terminal").performClick()@@ -43,13 +43,23 @@ class WorkingIndicatorTest {/** Claude's thinking text arrives as its thinking ends, so the activity unfolds before the turn has steps. */@Test fun activityUnfoldsBeforeTheTurnHasSteps() {compose.mainClock.autoAdvance = false- compose.setContent { Hosted { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = "Thinking…"), emptyList()) } }+ compose.setContent { Hosted { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = "Thinking…"), emptyList(), details = true) } }compose.mainClock.advanceTimeBy(1000)compose.onNodeWithText("Thinking…").performClick()compose.mainClock.advanceTimeBy(1000)compose.onNodeWithText("Nothing yet.").assertIsDisplayed()}+ /** Thinking details are off by default: the activity is a plain status line. */+ @Test fun withoutThinkingDetailsTheActivityDoesNotUnfold() {+ compose.mainClock.autoAdvance = false+ val step = Entry("tool", 0, "bot", 1, "tool", 1, buildJsonObject { put("title", "npm test"); put("status", "in_progress") })+ compose.setContent { Hosted { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = "Terminal"), listOf(step), details = false) } }+ compose.mainClock.advanceTimeBy(1000)+ compose.onNodeWithText("Terminal").assertIsDisplayed().assertHasNoClickAction()+ compose.onNodeWithText("npm test").assertDoesNotExist()+ }+@Test fun activityUpdatesWithoutMovingHistory() {// The live orb runs a frame loop; advance motion explicitly instead of waiting for it to stop.compose.mainClock.autoAdvance = false@@ -61,7 +71,7 @@ class WorkingIndicatorTest {rememberFollowing(list, "message", 1, working = true, bottom = 0.dp)LazyColumn(Modifier.size(320.dp).testTag("conversation"), state = list, contentPadding = PaddingValues(0.dp)) {items(30) { Box(Modifier.height(48.dp)) { Text("Message $it") } }- item("working") { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = activity.value), emptyList()) }+ item("working") { WorkingIndicator(Bot("bot", "Bot", status = "working", activity = activity.value), emptyList(), details = false) }}}}diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.ktindex a4cf1038..9ffce275 100644--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatRows.kt@@ -374,15 +374,17 @@ internal val Entry.botReactions: Map<String, List<String>> get() =}}-/** The bot's current activity and elapsed time; a tap unfolds the turn's steps. */-@Composable internal fun WorkingIndicator(bot: Bot, steps: List<Entry>) {+/** The bot's current activity and elapsed time; with thinking `details` on (Settings), a tap unfolds the turn's steps. */+@Composable internal fun WorkingIndicator(bot: Bot, steps: List<Entry>, details: Boolean) {val needs = bot.status == "needsInput"// Each turn starts folded.- var open by remember(bot.startedAt) { mutableStateOf(false) }+ var expanded by remember(bot.startedAt) { mutableStateOf(false) }+ val open = details && expandedval turn by animateFloatAsState(if (open) 90f else 0f, Motion.layout(), label = "Chevron")val action = tr(if (open) "Hide steps" else "Show steps")val state = tr(if (open) "Expanded" else "Collapsed")- val toggle = Modifier.clickable(role = Role.Button, onClickLabel = action) { open = !open }.semantics { stateDescription = state }+ val toggle = if (!details) Modifier+ else Modifier.clickable(role = Role.Button, onClickLabel = action) { expanded = !expanded }.semantics { stateDescription = state }Column(Modifier.fillMaxWidth().padding(top = 6.dp, end = 40.dp)) {Column(Modifier.then(if (open) Modifier.fillMaxWidth() else Modifier).animateContentSize(Motion.layoutSize).clip(RoundedRectangle(18.dp)).background(Palette.bubbleAgent).padding(horizontal = 16.dp, vertical = 12.dp)) {@@ -392,7 +394,7 @@ internal val Entry.botReactions: Map<String, List<String>> get() =Text(tr(bot.activity.ifEmpty { "Working…" }), Modifier.weight(1f, fill = open), style = Type.subheadline,color = if (needs) Palette.warning else Palette.secondary, maxLines = 1, overflow = TextOverflow.Ellipsis)bot.startedAt?.let { Elapsed(it) }- Symbol("chevron.right", Modifier.rotate(turn), size = 13.dp, tint = Palette.tertiary)+ if (details) Symbol("chevron.right", Modifier.rotate(turn), size = 13.dp, tint = Palette.tertiary)}AnimatedVisibility(open, enter = fadeIn(Motion.fade()) + expandVertically(Motion.layoutSize),exit = fadeOut(Motion.fade()) + shrinkVertically(Motion.layoutSize)) { WorkingSteps(steps) }diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.ktindex 7356d4a3..8c7385e4 100644--- a/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt+++ b/apps/android/app/src/main/kotlin/com/codync/android/ChatScreen.kt@@ -55,6 +55,7 @@ import androidx.compose.ui.semantics.semanticsimport androidx.compose.ui.text.style.TextOverflowimport androidx.compose.ui.unit.Dpimport androidx.compose.ui.unit.dp+import androidx.lifecycle.compose.collectAsStateWithLifecycleimport com.codync.android.core.*import com.codync.android.design.*import com.kyant.shapes.Capsule@@ -200,6 +201,7 @@ import com.kyant.shapes.Capsuleval items = chatItems(entries, pending)val working = bot.isWorking(bot.id) && state.connection is LinkState.Readyval more = bot.id !in state.historyComplete+ val details by ThinkingDetails.enabled.collectAsStateWithLifecycle()// Pull to refresh reconnects, like Reconnect in the roster's computer menu, until the link is back.ConversationList(items.lastOrNull()?.id, entries.lastOrNull()?.rev, working, padding, store::refreshConnection, indicatorTop) {if (more) item("earlier") {@@ -225,6 +227,6 @@ import com.kyant.shapes.Capsuleis ChatItem.Exchanges -> BotMessageRow(item.group, state) { openPeer(item.group.peerId) }}}- if (working) item("working") { WorkingIndicator(bot, workingSteps(state.entries.filter { it.botId == bot.id })) }+ if (working) item("working") { WorkingIndicator(bot, workingSteps(state.entries.filter { it.botId == bot.id }), details) }}}diff --git a/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt b/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.ktindex 9b76058a..c5ce7c4d 100644--- a/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt+++ b/apps/android/app/src/main/kotlin/com/codync/android/MainActivity.kt@@ -40,6 +40,7 @@ class MainActivity : ComponentActivity() {override fun onCreate(savedInstanceState: Bundle?) {super.onCreate(savedInstanceState)AppearancePreferences.initialize(applicationContext)+ ThinkingDetails.initialize(applicationContext)NativeAccounts.initialize(this)Analytics.start(applicationContext)// Clerk's session, not the UI's copy of it: right as sign-in and sign-out happen.diff --git a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.ktindex 19bffe30..a99ff5a2 100644--- a/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt+++ b/apps/android/app/src/main/kotlin/com/codync/android/SettingsView.kt@@ -120,6 +120,7 @@ import kotlinx.serialization.json.put}}}+ ThinkingDetailsSettings()NotificationsSection(state, store)CardSection(footer = "Which features you use, never your messages, code or files. Helps us spot bugs sooner and make Codync better for you.") {row {diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ThinkingDetails.kt b/apps/android/app/src/main/kotlin/com/codync/android/ThinkingDetails.ktnew file mode 100644index 00000000..42e3ff68--- /dev/null+++ b/apps/android/app/src/main/kotlin/com/codync/android/ThinkingDetails.kt@@ -0,0 +1,25 @@+package com.codync.android++import android.content.Context+import android.content.SharedPreferences+import kotlinx.coroutines.flow.MutableStateFlow+import kotlinx.coroutines.flow.asStateFlow++/** Device preference: the working pill unfolds the turn's thinking and steps. Off (the default) keeps the chat to its+ * messages (iOS `ThinkingDetails`). */+internal object ThinkingDetails {+ private var stored: SharedPreferences? = null+ private val current = MutableStateFlow(false)+ val enabled = current.asStateFlow()++ fun initialize(context: Context) {+ val preferences = context.getSharedPreferences("codync-chat", Context.MODE_PRIVATE)+ stored = preferences+ current.value = preferences.getBoolean("showThinkingDetails", false)+ }++ fun set(on: Boolean) {+ stored?.edit()?.putBoolean("showThinkingDetails", on)?.apply()+ current.value = on+ }+}diff --git a/apps/android/app/src/main/kotlin/com/codync/android/ThinkingDetailsSettings.kt b/apps/android/app/src/main/kotlin/com/codync/android/ThinkingDetailsSettings.ktnew file mode 100644index 00000000..01f39523--- /dev/null+++ b/apps/android/app/src/main/kotlin/com/codync/android/ThinkingDetailsSettings.kt@@ -0,0 +1,15 @@+package com.codync.android++import androidx.compose.runtime.Composable+import androidx.compose.runtime.getValue+import androidx.lifecycle.compose.collectAsStateWithLifecycle+import com.codync.android.design.CardSection++/** Settings › Chat: whether the working pill unfolds the turn's thinking and steps on this device. */+@Composable+internal fun ThinkingDetailsSettings() {+ val details by ThinkingDetails.enabled.collectAsStateWithLifecycle()+ CardSection("Chat", "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.") {+ row { SwitchRow("Show thinking details", isOn = details, onChange = ThinkingDetails::set) }+ }+}diff --git a/apps/desktop/src/renderer/lib/prefs.ts b/apps/desktop/src/renderer/lib/prefs.tsindex 6ead8181..70dab9cf 100644--- a/apps/desktop/src/renderer/lib/prefs.ts+++ b/apps/desktop/src/renderer/lib/prefs.ts@@ -66,6 +66,8 @@ export const prefs = {computerAccessSetup: pref<'ready' | 'later' | null>('computerAccessSetup', null),starAsk: pref<StarAsk>('githubStarAsk', { kind: 'never' }),appLanguage: pref<AppLanguage>('appLanguage', 'system'),+ /** The working pill unfolds the turn's thinking and steps; off keeps the chat to its messages. */+ thinkingDetails: pref('showThinkingDetails', false),}/** The Mac preference supplies one scale for conversation text and app chrome. */diff --git a/apps/desktop/src/renderer/views/settings/SettingsView.tsx b/apps/desktop/src/renderer/views/settings/SettingsView.tsxindex 739d530e..5e6e7995 100644--- a/apps/desktop/src/renderer/views/settings/SettingsView.tsx+++ b/apps/desktop/src/renderer/views/settings/SettingsView.tsx@@ -128,6 +128,7 @@ function GeneralSettings() {const systemLanguage = typeof navigator === 'undefined' ? 'en' : navigator.languageconst [usageIconStyle, setUsageIconStyle] = usePref(prefs.usageIconStyle)const [compact, setCompact] = usePref(prefs.sidebarCompact)+ const [thinkingDetails, setThinkingDetails] = usePref(prefs.thinkingDetails)const [showInDock, setShowInDock] = useState(true)useEffect(() => void window.codync.app.showInDock().then(setShowInDock), [])const [launchAtLogin, setLaunchAtLogin] = useState(false)@@ -200,6 +201,11 @@ function GeneralSettings() {/></ValueRow></CardSection>+ <CardSection title="Chat" footer="Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.">+ <Switch on={thinkingDetails} onChange={setThinkingDetails}>+ Show thinking details+ </Switch>+ </CardSection><CardSection title="System">{window.codync.platform === 'darwin' ? <Switch on={showInDock} onChange={(on) => void window.codync.app.setShowInDock(on).then(setShowInDock)}>Show in Dock</Switch> : null}{window.codync.island.supported ? (diff --git a/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx b/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsxindex b70e3e1c..7ab87862 100644--- a/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx+++ b/apps/desktop/src/renderer/views/thread/WorkingIndicator.tsx@@ -5,28 +5,40 @@ import { Icon } from '../../components/Icon'import { HStack, VStack } from '../../components/Stack'import { Text } from '../../components/Text'import { ThinkingOrb } from '../../components/ThinkingOrb'+import { prefs, usePref } from '../../lib/prefs'import { useTr } from '../../lib/use-language'import { useFollowEnd } from './follow-end'import { TraceRow } from './TraceView'-/** The bot's current activity and elapsed time; a click unfolds the turn's steps. */+/** The bot's current activity and elapsed time; with thinking details on (Settings), a click unfolds the turn's steps. */export function WorkingIndicator({ bot, steps }: { bot: Bot; steps: Entry[] }) {const tr = useTr()+ const [details] = usePref(prefs.thinkingDetails)const waiting = needsInput(bot)- const [open, setOpen] = useState(false)+ const [expanded, setExpanded] = useState(false)+ const open = details && expanded+ const status = (+ <HStack as="span" gap={8}>+ <ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} />+ <Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate grow>{tr(bot.activity || 'Working…')}</Text>+ {bot.startedAt ? <Timer since={bot.startedAt} /> : null}+ {details ? (+ <span className={`disclosure-chevron${open ? ' open' : ''}`}>+ <Icon name="chevron.right" size={10} weight="semibold" />+ </span>+ ) : null}+ </HStack>+ )return (<VStack align="flex-start" className="agent-inset"><div className={open ? 'working expanded' : 'working'}>- <button className="working-toggle" onClick={() => setOpen((x) => !x)} aria-expanded={open} title={tr(open ? 'Hide steps' : 'Show steps')}>- <HStack as="span" gap={8}>- <ThinkingOrb state={waiting ? 'listening' : 'working'} size={16} color={waiting ? 'var(--warning)' : 'var(--secondary)'} />- <Text size="subheadline" tone={waiting ? 'attention' : 'secondary'} truncate grow>{tr(bot.activity || 'Working…')}</Text>- {bot.startedAt ? <Timer since={bot.startedAt} /> : null}- <span className={`disclosure-chevron${open ? ' open' : ''}`}>- <Icon name="chevron.right" size={10} weight="semibold" />- </span>- </HStack>- </button>+ {details ? (+ <button className="working-toggle" onClick={() => setExpanded((x) => !x)} aria-expanded={open} title={tr(open ? 'Hide steps' : 'Show steps')}>+ {status}+ </button>+ ) : (+ status+ )}<Reveal show={open}><WorkingSteps steps={steps} /></Reveal>diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.jsonindex 7528d556..b08afc8c 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/de.json@@ -967,6 +967,12 @@"Show what it did": "Seine Aktionen anzeigen","Show steps": "Schritte anzeigen","Hide steps": "Schritte ausblenden",+ "Chat": "Chat",+ "Show thinking details": "Denkdetails anzeigen",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "Lässt dich die Gedanken und Schritte eines arbeitenden Bots über seinen Status im Chat aufklappen. Gilt nur für dieses Gerät.",+ "Thinking details on: > unfolds a working bot's steps": "Denkdetails an: > klappt die Schritte eines arbeitenden Bots auf",+ "Thinking details off": "Denkdetails aus",+ "Turn on Show thinking details (^k) to unfold the steps": "Schalte „Denkdetails anzeigen“ (^k) ein, um die Schritte aufzuklappen","Sign in on the page that opened. This updates by itself when you're done.": "Melde dich auf der geöffneten Seite an. Danach wird diese Ansicht automatisch aktualisiert.","Sign in to see the other computers in your account.": "Melde dich an, um die anderen Computer in deinem Konto zu sehen.","Sign-in link copied: open it on this computer, then ^r refreshes": "Anmeldelink kopiert: auf diesem Computer öffnen, dann mit ^r aktualisieren",diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.jsonindex 5353c9e7..811e8c3f 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/es.json@@ -967,6 +967,12 @@"Show what it did": "Mostrar lo que hizo","Show steps": "Mostrar pasos","Hide steps": "Ocultar pasos",+ "Chat": "Chat",+ "Show thinking details": "Mostrar detalles del razonamiento",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "Te permite desplegar el razonamiento y los pasos de un bot que trabaja desde su estado en el chat. Solo cambia este dispositivo.",+ "Thinking details on: > unfolds a working bot's steps": "Detalles del razonamiento activados: > despliega los pasos de un bot que trabaja",+ "Thinking details off": "Detalles del razonamiento desactivados",+ "Turn on Show thinking details (^k) to unfold the steps": "Activa \"Mostrar detalles del razonamiento\" (^k) para desplegar los pasos","Sign in on the page that opened. This updates by itself when you're done.": "Inicia sesión en la página abierta. Esto se actualiza automáticamente al terminar.","Sign in to see the other computers in your account.": "Inicia sesión para ver las demás computadoras de tu cuenta.","Sign-in link copied: open it on this computer, then ^r refreshes": "Enlace de inicio de sesión copiado: ábrelo en esta computadora y luego ^r actualiza",diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.jsonindex dc41b1d5..136f0c33 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/fr.json@@ -967,6 +967,12 @@"Show what it did": "Voir ce qu’il a fait","Show steps": "Afficher les étapes","Hide steps": "Masquer les étapes",+ "Chat": "Discussion",+ "Show thinking details": "Afficher les détails de la réflexion",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "Permet de déplier la réflexion et les étapes d'un bot au travail depuis son statut dans la discussion. Ne change que cet appareil.",+ "Thinking details on: > unfolds a working bot's steps": "Détails de la réflexion activés : > déplie les étapes d'un bot au travail",+ "Thinking details off": "Détails de la réflexion désactivés",+ "Turn on Show thinking details (^k) to unfold the steps": "Activez « Afficher les détails de la réflexion » (^k) pour déplier les étapes","Sign in on the page that opened. This updates by itself when you're done.": "Connectez-vous sur la page ouverte. L’affichage s’actualise automatiquement une fois terminé.","Sign in to see the other computers in your account.": "Connectez-vous pour voir les autres ordinateurs de votre compte.","Sign-in link copied: open it on this computer, then ^r refreshes": "Lien de connexion copié : ouvrez-le sur cet ordinateur, puis ^r pour actualiser",diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.jsonindex b7edd8b6..6a139178 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ja.json@@ -967,6 +967,12 @@"Show what it did": "それが何をしたかを見せてください","Show steps": "ステップを表示","Hide steps": "ステップを隠す",+ "Chat": "チャット",+ "Show thinking details": "思考の詳細を表示",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "チャットのステータスから、作業中のボットの思考とステップを展開できます。このデバイスだけに適用されます。",+ "Thinking details on: > unfolds a working bot's steps": "思考の詳細をオンにしました:> で作業中のボットのステップを展開します",+ "Thinking details off": "思考の詳細をオフにしました",+ "Turn on Show thinking details (^k) to unfold the steps": "ステップを展開するには「思考の詳細を表示」(^k) をオンにしてください","Sign in on the page that opened. This updates by itself when you're done.": "開いたページでサインインします。完了すると、これは自動的に更新されます。","Sign in to see the other computers in your account.": "サインインして、アカウント内の他のコンピューターを表示します。","Sign-in link copied: open it on this computer, then ^r refreshes": "サインイン リンクがコピーされました: このコンピュータで開くと、^r が更新されます",diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.jsonindex 68e1f1af..83e149df 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/ko.json@@ -967,6 +967,12 @@"Show what it did": "수행한 내용 보기","Show steps": "단계 보기","Hide steps": "단계 숨기기",+ "Chat": "채팅",+ "Show thinking details": "생각 세부 정보 보기",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "채팅의 상태에서 작업 중인 봇의 생각과 단계를 펼칠 수 있습니다. 이 기기에만 적용됩니다.",+ "Thinking details on: > unfolds a working bot's steps": "생각 세부 정보 켜짐: >로 작업 중인 봇의 단계를 펼칩니다",+ "Thinking details off": "생각 세부 정보 꺼짐",+ "Turn on Show thinking details (^k) to unfold the steps": "단계를 펼치려면 \"생각 세부 정보 보기\"(^k)를 켜세요","Sign in on the page that opened. This updates by itself when you're done.": "열린 페이지에서 로그인하세요. 완료하면 자동으로 갱신됩니다.","Sign in to see the other computers in your account.": "계정의 다른 컴퓨터를 보려면 로그인하세요.","Sign-in link copied: open it on this computer, then ^r refreshes": "로그인 링크 복사됨: 이 컴퓨터에서 연 뒤 ^r로 새로고침",diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.jsonindex efde504e..ccfd6969 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hans.json@@ -967,6 +967,12 @@"Show what it did": "显示它做了什么","Show steps": "显示步骤","Hide steps": "隐藏步骤",+ "Chat": "对话",+ "Show thinking details": "显示思考细节",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "可以从对话里的状态,展开工作中 Bot 的思考和步骤。只会改变这台设备。",+ "Thinking details on: > unfolds a working bot's steps": "思考细节已开启:按 > 展开工作中 Bot 的步骤",+ "Thinking details off": "思考细节已关闭",+ "Turn on Show thinking details (^k) to unfold the steps": "开启「显示思考细节」(^k) 才能展开步骤","Sign in on the page that opened. This updates by itself when you're done.": "在打开的页面上登录。完成后这里会自己更新。","Sign in to see the other computers in your account.": "登录后才能看到账户里的其他电脑。","Sign-in link copied: open it on this computer, then ^r refreshes": "登录链接已复制:在这台电脑上打开,然后按 ^r 刷新",diff --git a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.jsonindex b7a8d6f5..edd7bbf6 100644--- a/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json+++ b/apps/ios/Kit/Sources/CodyncKit/Resources/Languages/zh-Hant.json@@ -967,6 +967,12 @@"Show what it did": "顯示它做了什麼","Show steps": "顯示步驟","Hide steps": "隱藏步驟",+ "Chat": "對話",+ "Show thinking details": "顯示思考細節",+ "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.": "可以從對話裡的狀態,展開工作中 Bot 的思考和步驟。只會改變這台裝置。",+ "Thinking details on: > unfolds a working bot's steps": "思考細節已開啟:按 > 展開工作中 Bot 的步驟",+ "Thinking details off": "思考細節已關閉",+ "Turn on Show thinking details (^k) to unfold the steps": "開啟「顯示思考細節」(^k) 才能展開步驟","Sign in on the page that opened. This updates by itself when you're done.": "在開啟的頁面上登入。完成後這裡會自己更新。","Sign in to see the other computers in your account.": "登入後才能看到賬戶裡的其他電腦。","Sign-in link copied: open it on this computer, then ^r refreshes": "登入連結已複製:在這臺電腦上開啟,然後按 ^r 重新整理",diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swiftindex 042b85df..e69d71a2 100644--- a/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ChatRows.swift@@ -260,24 +260,31 @@ struct NoticeRow: View {}}-/// The bot's current activity and elapsed time; a tap unfolds the turn's steps.+/// The bot's current activity and elapsed time; with thinking details on (Settings), a tap unfolds the turn's steps.struct WorkingIndicator: View {let bot: Botlet steps: [Entry]- @State private var open = false+ @AppStorage(ThinkingDetails.storageKey) private var details = false+ @State private var expanded = false@Environment(\.accessibilityReduceMotion) private var reduceMotion+ private var open: Bool { details && expanded }+var body: some View {let shape = RoundedRectangle(cornerRadius: 18, style: .continuous)VStack(alignment: .leading, spacing: 0) {- Button {- withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { open.toggle() }- } label: {- status.contentShape(Rectangle())+ if details {+ Button {+ withAnimation(Motion.reduced(Motion.layout, reduceMotion)) { expanded.toggle() }+ } label: {+ status.contentShape(Rectangle())+ }+ .buttonStyle(.plain)+ .accessibilityHint(L10n.tr(open ? "Hide steps" : "Show steps"))+ .accessibilityValue(open ? "Expanded" : "Collapsed")+ } else {+ status}- .buttonStyle(.plain)- .accessibilityHint(L10n.tr(open ? "Hide steps" : "Show steps"))- .accessibilityValue(open ? "Expanded" : "Collapsed")if open {WorkingSteps(steps: steps).padding(.top, 12)@@ -307,10 +314,12 @@ struct WorkingIndicator: View {.font(.footnote.monospacedDigit()).foregroundStyle(Palette.tertiary)}- Image(systemName: "chevron.right")- .font(.caption2.weight(.semibold))- .foregroundStyle(Palette.tertiary)- .rotationEffect(.degrees(open ? 90 : 0))+ if details {+ Image(systemName: "chevron.right")+ .font(.caption2.weight(.semibold))+ .foregroundStyle(Palette.tertiary)+ .rotationEffect(.degrees(open ? 90 : 0))+ }}}}diff --git a/apps/ios/Kit/Sources/CodyncUI/Thread/ThinkingDetailsSettings.swift b/apps/ios/Kit/Sources/CodyncUI/Thread/ThinkingDetailsSettings.swiftnew file mode 100644index 00000000..60c42abf--- /dev/null+++ b/apps/ios/Kit/Sources/CodyncUI/Thread/ThinkingDetailsSettings.swift@@ -0,0 +1,22 @@+import CodyncKit+import SwiftUI++/// A device preference: the working pill unfolds the turn's thinking and steps. Off (the default) keeps the chat to its+/// messages.+enum ThinkingDetails {+ static let storageKey = "showThinkingDetails"+}++/// Settings › Chat: whether the working pill unfolds the turn's thinking and steps on this device.+public struct ThinkingDetailsSettings: View {+ @AppStorage(ThinkingDetails.storageKey) private var details = false++ public init() {}++ public var body: some View {+ CardSection("Chat", footer: "Lets you unfold a working bot's thinking and steps from its status in the chat. Only changes this device.") {+ Toggle(isOn: $details) { Text(L10n.tr("Show thinking details")) }+ .toggleStyle(.codync)+ }+ }+}diff --git a/apps/ios/Views/SettingsView.swift b/apps/ios/Views/SettingsView.swiftindex 40570d53..9d329a01 100644--- a/apps/ios/Views/SettingsView.swift+++ b/apps/ios/Views/SettingsView.swift@@ -75,6 +75,8 @@ struct SettingsView: View {LanguageSettings()+ ThinkingDetailsSettings()+CardSection("Notifications", footer: "Get a result summary, a request for input, or a failure notice. Notification previews follow your iOS settings.") {Toggle(isOn: $notificationsEnabled) { Text(L10n.tr("Push notifications")) }.toggleStyle(.codync)diff --git a/apps/ios/WhatsNew.md b/apps/ios/WhatsNew.mdindex 28d85556..09c29fc9 100644--- a/apps/ios/WhatsNew.md+++ b/apps/ios/WhatsNew.md@@ -17,7 +17,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o- 帳號選單裡的「電腦與設定」和它打開的頁面同名。- 新增聯結器失敗後再試一次,會使用你改好的金鑰。- 使用 Hermes Agent 或 Gemini CLI 的 Bot,記憶頁會說明它們自己的記憶由所有用同一個 agent 的 Bot 共用,Codync 沒辦法關掉。-- Bot 工作中點一下狀態膠囊,就能在對話裡展開這一輪的思考、工具與 MCP 呼叫,太長時在膠囊內捲動。+- 在設定的「對話」開啟「顯示思考細節」後,Bot 工作中點一下狀態膠囊,就能在對話裡展開這一輪的思考、工具與 MCP 呼叫,太長時在膠囊內捲動。- 新增「Open Live Mode」捷徑,選擇 Bot 後直接開啟語音聊天。- 新增「Send Text to Bot」捷徑,可選擇 Bot 並傳送文字;預設在背景傳送,也可開啟「Open Chat」顯示對話。- 點對話上方的 Bot 會打開它的詳情、資料庫、記憶與設定;「新會話」改到 Bot 列表的長按選單。@@ -32,7 +32,7 @@ a version without one gets a generic "Bug fixes and improvements" line. Delete o- The account sheet's Computers & settings row now has the same name as the page it opens.- Trying again after adding a connector failed uses the key you corrected.- For bots that run Hermes Agent or Gemini CLI, Memory explains that the agent's own memory is shared by every bot that runs it and Codync can't turn it off.-- While a bot works, tap its status pill to unfold this turn's thinking, tool and MCP calls right in the chat; a long turn scrolls inside the pill.+- Turn on Show thinking details in Settings › Chat, then tap a working bot's status pill to unfold this turn's thinking, tool and MCP calls right in the chat; a long turn scrolls inside the pill.- Use Open Live Mode in Shortcuts to choose a bot and start voice chat.- Use Send Text to Bot to choose a bot and send text in the background by default, or enable Open Chat to show the conversation.- Tapping the bot at the top of its chat opens its Details, Library, Memory and Settings; New session moved to the bot's touch-and-hold menu in the list.diff --git a/docs/architecture/conversation-runtime.md b/docs/architecture/conversation-runtime.mdindex 6304084b..b37c6781 100644--- a/docs/architecture/conversation-runtime.md+++ b/docs/architecture/conversation-runtime.md@@ -7,4 +7,4 @@- **A session that fails** with an internal error its agent gives no category (JSON-RPC `-32603` without `data.errorKind`) is closed right after the turn, when the agent can close and load sessions: Claude's adapter otherwise answers every later prompt on it with "The Claude Agent session has ended". The next message loads it again and the conversation carries on (`acp::may_end_session`).- Bot collaboration: built-in `team` MCP (`chat/team.rs`) lists visible bots and sends one a request through its actor queue (`message_bot`); nothing waits, and the reply comes back to the sender as a turn of its own in its main chat. Requests and replies are separate turns, bounded by the chain's hop count; native subagents stay with the harness. See [docs/features/bot-collaboration.md](../features/bot-collaboration.md).- **Context & memory**: frozen instruction snapshot per session + compaction epoch (Claude gets it as a system prompt), profile edits as update blocks, memory in the host (a layer shared by all bots and one per bot, written by the user, the bots' tools and dreaming), busy-time messages folded into one turn, interrupted turns resumed: [docs/features/context-and-memory.md](../features/context-and-memory.md).-- **Chat shows only**: user messages, the bot's messages (`data.final`: each `send_message` call from the built-in `chat` MCP, Grok Bot's way; a turn that sent none falls back to its last text, unless it reacted to the user's message instead or passed), permission cards, notices. Nothing streams into a bubble; narration, thoughts, tool calls, plans are trace entries (Full conversation sheet; the live activity also unfolds the running turn's steps, without the bot's `bookkeeping` tool calls): [docs/features/chat-messages.md](../features/chat-messages.md).+- **Chat shows only**: user messages, the bot's messages (`data.final`: each `send_message` call from the built-in `chat` MCP, Grok Bot's way; a turn that sent none falls back to its last text, unless it reacted to the user's message instead or passed), permission cards, notices. Nothing streams into a bubble; narration, thoughts, tool calls, plans are trace entries (Full conversation sheet; with [Show thinking details](../features/chat-messages.md#while-it-works) on (Settings › Chat), the live activity also unfolds the running turn's steps, without the bot's `bookkeeping` tool calls): [docs/features/chat-messages.md](../features/chat-messages.md).diff --git a/docs/design/ui-conventions.md b/docs/design/ui-conventions.mdindex f896ee9f..39876401 100644--- a/docs/design/ui-conventions.md+++ b/docs/design/ui-conventions.md@@ -124,8 +124,9 @@ and states.- A chat shows the latest non-final agent segment only while its turn isworking and connected. Earlier narration, tools, empty text and `(pass)` stay outof the message list: the running turn's thinking, narration, tool calls (not the- bot's bookkeeping) and plan appear only in the working pill's unfolded steps- ([while it works](../features/chat-messages.md#while-it-works)), and every turn's in+ bot's bookkeeping) and plan appear only in the working pill's unfolded steps, with+ Show thinking details on (Settings › Chat;+ [while it works](../features/chat-messages.md#while-it-works)), and every turn's inFull conversation. Completed replies remain visible.- TUI keeps text and attachments in the composer until sending succeeds. A failedsend can be retried with Enter; it reuses the nonce. A late response must not erasediff --git a/docs/features/chat-messages.md b/docs/features/chat-messages.mdindex 0d9b30ca..c2591b22 100644--- a/docs/features/chat-messages.md+++ b/docs/features/chat-messages.md@@ -67,7 +67,9 @@ reads as **Typing…** (`activity()` in `agent/bot/tool_entry.rs`). The activityanimated orb, a short status and elapsed time, in a pill no wider than an agent bubble whose statustruncates to one line. Replies arrive as complete messages.-The pill ends in a chevron, and a tap (click) unfolds the running turn's steps inside it:+**Show thinking details** (Settings › Chat; each device's own choice, off by default) decides whether the pill+unfolds; off, it stays a plain status line. On, the pill ends in a chevron, and a tap (click) unfolds the running+turn's steps inside it:the turn's thinking text, narration (never a `(pass)`), tool calls (MCP tools included) and plan, in order, with eachtool's output and diffs one more tap away. The pill widens to an agent bubble's width, the stepsscroll inside it past 280 pt and follow new ones until the reader scrolls up, and each turn starts@@ -84,7 +86,8 @@ short thought's summary arrives in one piece when the thinking ends, a long one'Full conversation remains available through a message's Show what it did (its touch-and-holdmenu on the iPhone and Android, its actions on the desktop). It contains narration, allthoughts, tools and previous turns, and follows new steps until the reader scrolls up.-On the terminal, `>` or a click on the working line unfolds the steps under it (their last+On the terminal, with thinking details turned on (`^k` › Show thinking details, kept in+`tui-thinking-details`), `>` or a click on the working line unfolds the steps under it (their last14 lines), `t` opens Full conversation, and the working line keeps the count of steps so far;once the turn ends, its last message's `↳ N steps` line counts them the same way.diff --git a/host/src/tui/app/overlay_keys.rs b/host/src/tui/app/overlay_keys.rsindex 478a8327..173c36ac 100644--- a/host/src/tui/app/overlay_keys.rs+++ b/host/src/tui/app/overlay_keys.rs@@ -65,6 +65,11 @@ impl App {let title = super::super::l10n::cycle_language();self.flash(title.as_ref());}+ Action::ThinkingDetails => self.flash(if super::super::details::toggle() {+ "Thinking details on: > unfolds a working bot's steps"+ } else {+ "Thinking details off"+ }),Action::Keys => self.overlays.push(Overlay::Help(Editor::default())),}}diff --git a/host/src/tui/app/steps.rs b/host/src/tui/app/steps.rsindex 77e66026..a32eec08 100644--- a/host/src/tui/app/steps.rs+++ b/host/src/tui/app/steps.rs@@ -19,10 +19,15 @@ impl App {self.online && bot.busy() && bot.works_here()}- /// `>` or a click on the working line: unfolds or folds the selected bot's steps for this turn.+ /// `>` or a click on the working line: unfolds or folds the selected bot's steps for this turn, once thinking+ /// details are on.pub(super) fn toggle_steps(&mut self) {let Some(bot) = self.bot().filter(|b| self.shows_activity(b)) else { return };let Some(turn) = running_turn(&self.lane(&bot.id)) else { return };+ if !super::super::details::enabled() {+ self.flash("Turn on Show thinking details (^k) to unfold the steps");+ return;+ }let key = (bot.id.clone(), turn);self.steps_open = if self.steps_open.as_ref() == Some(&key) { None } else { Some(key) };}diff --git a/host/src/tui/app/ui.rs b/host/src/tui/app/ui.rsindex 34d749c5..db9530ae 100644--- a/host/src/tui/app/ui.rs+++ b/host/src/tui/app/ui.rs@@ -60,11 +60,12 @@ pub enum Action {Analytics,AboutAnalytics,Language,+ ThinkingDetails,Keys,Appearance(super::super::appearance::Appearance),}-pub const ACTIONS: [(&str, &str, Action); 17] = [+pub const ACTIONS: [(&str, &str, Action); 18] = [("New bot…", "n", Action::NewBot),("New group chat…", "m", Action::NewGroup),("Extensions: agents, connectors, skills…", "A", Action::Market),@@ -81,6 +82,7 @@ pub const ACTIONS: [(&str, &str, Action); 17] = [("Appearance: Light", "", Action::Appearance(super::super::appearance::Appearance::Light)),("Appearance: Dark", "", Action::Appearance(super::super::appearance::Appearance::Dark)),("App language…", "", Action::Language),+ ("Show thinking details", "", Action::ThinkingDetails),("Keys", "?", Action::Keys),];diff --git a/host/src/tui/appearance.rs b/host/src/tui/appearance.rsindex 223b83b5..791625ef 100644--- a/host/src/tui/appearance.rs+++ b/host/src/tui/appearance.rs@@ -31,17 +31,14 @@ impl Appearance {}}+const FILE: &str = "tui-appearance";+fn load() -> Appearance {- match std::fs::read_to_string(crate::service::data_dir().join("tui-appearance")) {- Ok(value) => Appearance::parse(&value).unwrap_or(Appearance::System),- Err(error) if error.kind() == std::io::ErrorKind::NotFound => {- std::env::var("CODYNC_THEME").ok().and_then(|value| Appearance::parse(&value)).unwrap_or(Appearance::System)- }- Err(error) => {- tracing::warn!(%error, "couldn't read terminal appearance");- Appearance::System- }+ match super::choice::read(FILE) {+ Some(value) => Appearance::parse(&value),+ None => std::env::var("CODYNC_THEME").ok().and_then(|value| Appearance::parse(&value)),}+ .unwrap_or(Appearance::System)}static SELECTED: LazyLock<AtomicU8> = LazyLock::new(|| AtomicU8::new(load() as u8));@@ -55,14 +52,7 @@ pub fn current() -> Appearance {}pub fn select(mode: Appearance) -> Result<()> {- let path = crate::service::data_dir().join("tui-appearance");- std::fs::create_dir_all(crate::service::data_dir())?;- let temporary = path.with_extension(format!("{}.tmp", uuid::Uuid::new_v4()));- let result = std::fs::write(&temporary, mode.name()).and_then(|()| std::fs::rename(&temporary, &path));- if result.is_err() {- let _ = std::fs::remove_file(&temporary);- }- result?;+ super::choice::write(FILE, mode.name())?;SELECTED.store(mode as u8, Ordering::Relaxed);Ok(())}diff --git a/host/src/tui/choice.rs b/host/src/tui/choice.rsnew file mode 100644index 00000000..c9165702--- /dev/null+++ b/host/src/tui/choice.rs@@ -0,0 +1,28 @@+//! A choice this terminal keeps for the next run, in `data_dir()/<name>`: never the host's.++use std::io;++/// The saved value; `None` when nothing is saved yet or it can't be read.+pub(in crate::tui) fn read(name: &str) -> Option<String> {+ match std::fs::read_to_string(crate::service::data_dir().join(name)) {+ Ok(value) => Some(value),+ Err(error) if error.kind() == io::ErrorKind::NotFound => None,+ Err(error) => {+ tracing::warn!(%error, name, "couldn't read the terminal's saved choice");+ None+ }+ }+}++/// Saves `value` whole: written beside the old one, then renamed over it.+pub(in crate::tui) fn write(name: &str, value: &str) -> io::Result<()> {+ let dir = crate::service::data_dir();+ std::fs::create_dir_all(&dir)?;+ let path = dir.join(name);+ let temporary = path.with_extension(format!("{}.tmp", uuid::Uuid::new_v4()));+ let result = std::fs::write(&temporary, value).and_then(|()| std::fs::rename(&temporary, &path));+ if result.is_err() {+ let _ = std::fs::remove_file(&temporary);+ }+ result+}diff --git a/host/src/tui/details.rs b/host/src/tui/details.rsnew file mode 100644index 00000000..c14b6ca2--- /dev/null+++ b/host/src/tui/details.rs@@ -0,0 +1,23 @@+//! Thinking details: whether the working line unfolds the turn's steps. This terminal's choice, never the host's; off+//! by default, so the chat keeps to its messages.++use std::sync::LazyLock;+use std::sync::atomic::{AtomicBool, Ordering};++const FILE: &str = "tui-thinking-details";++static ENABLED: LazyLock<AtomicBool> =+ LazyLock::new(|| AtomicBool::new(super::choice::read(FILE).is_some_and(|value| value.trim() == "on")));++pub(in crate::tui) fn enabled() -> bool {+ ENABLED.load(Ordering::Relaxed)+}++/// Turns thinking details on or off and keeps the choice for the next run; returns the new state.+pub(in crate::tui) fn toggle() -> bool {+ let on = !ENABLED.fetch_xor(true, Ordering::Relaxed);+ if let Err(error) = super::choice::write(FILE, if on { "on" } else { "off" }) {+ tracing::warn!(%error, "couldn't save the terminal's thinking details choice");+ }+ on+}diff --git a/host/src/tui/l10n.rs b/host/src/tui/l10n.rsindex d84ed07f..30a32de2 100644--- a/host/src/tui/l10n.rs+++ b/host/src/tui/l10n.rs@@ -106,15 +106,10 @@ static ES: LazyLock<HashMap<String, String>> = LazyLock::new(|| {static PREFERENCE: LazyLock<Mutex<AppLanguage>> = LazyLock::new(|| Mutex::new(read_preference()));+const FILE: &str = "tui-language";+fn read_preference() -> AppLanguage {- match std::fs::read_to_string(crate::service::data_dir().join("tui-language")) {- Ok(text) => AppLanguage::parse(text.trim()),- Err(error) if error.kind() == std::io::ErrorKind::NotFound => AppLanguage::System,- Err(error) => {- tracing::warn!(%error, "couldn't read the terminal language");- AppLanguage::System- }- }+ super::choice::read(FILE).map_or(AppLanguage::System, |text| AppLanguage::parse(text.trim()))}fn system_locale() -> Option<String> {@@ -378,10 +373,7 @@ pub(in crate::tui) fn cycle_language() -> Cow<'static, str> {*preference = next;next};- let dir = crate::service::data_dir();- if let Err(error) =- std::fs::create_dir_all(&dir).and_then(|()| std::fs::write(dir.join("tui-language"), next.stored()))- {+ if let Err(error) = super::choice::write(FILE, next.stored()) {tracing::warn!(%error, "couldn't save the terminal language");}language_title()diff --git a/host/src/tui/mod.rs b/host/src/tui/mod.rsindex 3c7f9ba5..e474e5ef 100644--- a/host/src/tui/mod.rs+++ b/host/src/tui/mod.rs@@ -3,7 +3,9 @@mod app;mod appearance;+mod choice;mod connections;+mod details;mod drafts;mod l10n;mod manage;diff --git a/host/src/tui/view/activity.rs b/host/src/tui/view/activity.rsindex a7f07583..d5725b9a 100644--- a/host/src/tui/view/activity.rs+++ b/host/src/tui/view/activity.rs@@ -1,5 +1,5 @@-//! The current activity and how many steps the turn has taken: `>` (or a click) unfolds them under-//! it, `t` opens Full conversation.+//! The current activity and how many steps the turn has taken: with thinking details on, `>` (or a+//! click) unfolds them under it; `t` opens Full conversation.use ratatui::text::{Line, Span};@@ -14,21 +14,27 @@ use super::transcript::{Built, gap, name_style};/// The most lines the unfolded steps take; earlier ones stay in Full conversation.const STEP_LINES: usize = 14;-pub(super) fn activity(out: &mut Built, app: &App, bot: &Bot, entries: &[&Entry], width: usize) {+/// `details`: this terminal's thinking details choice (`super::super::details`).+pub(super) fn activity(out: &mut Built, app: &App, bot: &Bot, entries: &[&Entry], width: usize, details: bool) {let t = theme();gap(out);out.lines.push(Line::from(Span::styled(format!(" {}", bot.name), name_style(&bot.color))));let steps = working_steps(entries);- let open = app.steps_open.as_ref().is_some_and(|(id, turn)| id == &bot.id && Some(*turn) == running_turn(entries));+ let open = details+ && app.steps_open.as_ref().is_some_and(|(id, turn)| id == &bot.id && Some(*turn) == running_turn(entries));let text = if bot.activity.is_empty() { tr("Working…") } else { tr(&bot.activity) };- out.buttons.push((out.lines.len(), 0, u(width), Click::Steps));- out.lines.push(Line::from(vec![+ let mut row = vec![Span::styled(format!(" {} ", spin(app)), t.secondary),Span::styled(truncate(text.as_ref(), width.saturating_sub(8)), t.secondary),- Span::styled(if open { " v" } else { " >" }, t.dim),- ]));- let hint =- format!(" {} steps so far · > {} · t full conversation", steps.len(), if open { "hide" } else { "show" });+ ];+ let hint = if details {+ out.buttons.push((out.lines.len(), 0, u(width), Click::Steps));+ row.push(Span::styled(if open { " v" } else { " >" }, t.dim));+ format!(" {} steps so far · > {} · t full conversation", steps.len(), if open { "hide" } else { "show" })+ } else {+ format!(" {} steps so far · t full conversation", steps.len())+ };+ out.lines.push(Line::from(row));out.lines.push(Line::from(Span::styled(hint, t.dim)));if open {// Claude's thinking text arrives as its thinking ends, so a turn can have no steps yet.@@ -57,11 +63,35 @@ mod tests {use serde_json::json;fn render(app: &App, entries: &[Entry]) -> (String, usize) {+ render_with(app, entries, true)+ }++ fn render_with(app: &App, entries: &[Entry], details: bool) -> (String, usize) {let mut out = Built { lines: vec![], buttons: vec![], messages: vec![] };- activity(&mut out, app, &app.bots["bot"], &entries.iter().collect::<Vec<_>>(), 80);+ activity(&mut out, app, &app.bots["bot"], &entries.iter().collect::<Vec<_>>(), 80, details);(out.lines.iter().map(ToString::to_string).collect::<Vec<_>>().join("\n"), out.buttons.len())}+ #[test]+ fn without_thinking_details_the_line_does_not_unfold() {+ let (tx, _) = tokio::sync::mpsc::unbounded_channel();+ let mut app = App::new(Client::new("http://127.0.0.1:1", None), tx, String::new());+ app.on_msg(Msg::Event(json!({"type": "bot", "bot": {"id": "bot", "name": "Bot", "activity": "Terminal"}})));+ let entries = [Entry {+ id: "tool".into(),+ seq: 1,+ turn: 1,+ kind: Kind::Tool,+ data: json!({"title": "rg TODO", "bookkeeping": false}),+ created_at: 0,+ }];+ app.steps_open = Some(("bot".into(), 1));+ let (text, buttons) = render_with(&app, &entries, false);+ assert!(text.contains("1 steps so far · t full conversation"));+ assert!(!text.contains("> show") && !text.contains("> hide") && !text.contains("rg TODO"));+ assert_eq!(buttons, 0);+ }+#[test]fn steps_unfold_under_the_activity_for_the_running_turn() {let (tx, _) = tokio::sync::mpsc::unbounded_channel();diff --git a/host/src/tui/view/goto.rs b/host/src/tui/view/goto.rsindex e7a3a6df..66725eaa 100644--- a/host/src/tui/view/goto.rs+++ b/host/src/tui/view/goto.rs@@ -86,6 +86,13 @@ pub(super) fn goto(buf: &mut Buffer, area: Rect, app: &mut App, g: &super::super(Action::Analytics, Some(false)) => "off",(Action::Analytics, None) => "",(Action::Language, _) => language.as_ref(),+ (Action::ThinkingDetails, _) => {+ if super::super::details::enabled() {+ "on"+ } else {+ "off"+ }+ }_ => key,};rput(buf, inner.right(), y, hint, t.dim.patch(base));diff --git a/host/src/tui/view/help.rs b/host/src/tui/view/help.rsindex 7242df2d..21debe45 100644--- a/host/src/tui/view/help.rs+++ b/host/src/tui/view/help.rs@@ -27,7 +27,7 @@ const HELP: [(&str, &str, &str); 67] = [("CHAT", "N", "reject and say why"),("CHAT", "1…9", "pick an approval option"),("CHAT", "s", "stop the bot"),- ("CHAT", ">", "show / hide the working turn's steps"),+ ("CHAT", ">", "show / hide the working turn's steps (thinking details on)"),("CHAT", "o", "last turn's steps"),("CHAT", "c", "copy the last reply"),("CHAT", "C", "open connection / login request"),diff --git a/host/src/tui/view/transcript.rs b/host/src/tui/view/transcript.rsindex 0c8853ff..e67679ba 100644--- a/host/src/tui/view/transcript.rs+++ b/host/src/tui/view/transcript.rs@@ -86,7 +86,7 @@ pub(super) fn build_chat(app: &App, b: &Bot, width: usize) -> Built {// A turn in flight: who's on it and what they're doing.// A message doesn't end the turn: the bot may send several.if app.shows_activity(b) {- super::activity::activity(&mut out, app, b, &entries, width);+ super::activity::activity(&mut out, app, b, &entries, width, super::super::details::enabled());} else if let Some(group) = b.away().filter(|_| b.busy()) {// Busy in a group it's in.let place = app.author_name(Some(group));diff --git a/web/content/docs/conversations.mdx b/web/content/docs/conversations.mdxindex 02b9c3cd..cc9b391d 100644--- a/web/content/docs/conversations.mdx+++ b/web/content/docs/conversations.mdx@@ -6,7 +6,7 @@ The chat shows your messages, the bot's messages, approval cards and short noticWhile the bot works, a line under the last message shows what it's doing and for how long. It reads **Typing…** while the bot writes you a message.-The line ends in an arrow. Tap or click it to unfold this turn's steps right in the chat: its thinking, what it said along the way, the tools and MCP tools it called and its plan. Tap a tool to see its output or diff. A long turn scrolls inside the line, which keeps showing the newest step. On the terminal UI, press `>` or click the line. Each new turn starts folded, and the steps leave with the line when the bot finishes.+To see more, turn on **Show thinking details** in Settings, under **Chat**. It's off by default and only changes the device you set it on. With it on, the line ends in an arrow. Tap or click it to unfold this turn's steps right in the chat: its thinking, what it said along the way, the tools and MCP tools it called and its plan. Tap a tool to see its output or diff. A long turn scrolls inside the line, which keeps showing the newest step. On the terminal UI, turn it on from `Ctrl-K` (**Show thinking details**), then press `>` or click the line. Each new turn starts folded, and the steps leave with the line when the bot finishes.Everything else the agent did (its narration, thinking, tool calls, diffs and plans) is in **Full conversation**: