Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing to tcode
# Contributing to Tcode

Thanks for taking the time. tcode is a small project — bug reports, UI polish and
Thanks for taking the time. Tcode is a small project — bug reports, UI polish and
new provider work are all welcome.

By participating you agree to the [Code of Conduct](CODE_OF_CONDUCT.md).
Expand Down Expand Up @@ -85,7 +85,7 @@ cargo run -p agent --example probe -- claude \
"What color is this image? Reply with just the color." /tmp/smoke --image /tmp/blue.png
```

`TCODE_DATA_DIR` points tcode at a throwaway profile (its own sessions, settings
`TCODE_DATA_DIR` points Tcode at a throwaway profile (its own sessions, settings
and installed ACP agents) — useful for demos, screenshots and trying a change
without touching your real threads.

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ speaks ACP.
> ACP entries that duplicate a native integration are deliberately hidden from
> the marketplace so each CLI has one clear, highest-fidelity path.

## Use tcode from other devices
## Use Tcode from other devices

Tcode runs on the machine that holds your projects, starts your agents, and
keeps your threads. You can open that machine from another desktop, a phone or
Expand Down Expand Up @@ -125,7 +125,7 @@ choose it under **Nearby machines**, then connect. In a browser, open the
printed HTTP link and log in with the password. The browser’s **Settings →
Other devices** shows codes and QR codes for native clients and controls new
pairings and device revocation.
See [Use tcode from other devices](docs/remote.md) for the native-app and
See [Use Tcode from other devices](docs/remote.md) for the native-app and
browser steps.

**Security.** LAN connections use plain HTTP and WebSockets. Adding a machine
Expand Down
6 changes: 3 additions & 3 deletions crates/agent/src/acp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ async fn handshake(
)
.client_info(
acp::Implementation::new("tcode", env!("CARGO_PKG_VERSION"))
.title("tcode"),
.title("Tcode"),
),
)
.block_task()
Expand Down Expand Up @@ -692,12 +692,12 @@ async fn handshake(
let mcp_servers = mcp_servers(&registrations, &caps);
if !registrations.is_empty() && mcp_servers.is_empty() {
log::info!(
"acp[{}]: no mcpCapabilities.http; tcode MCP servers are not registered",
"acp[{}]: no mcpCapabilities.http; Tcode MCP servers are not registered",
agent.id
);
let _ = events
.send(AgentEvent::Warning { message: format!(
"{} does not support HTTP MCP servers; tcode MCP tools are unavailable in this session",
"{} does not support HTTP MCP servers; Tcode MCP tools are unavailable in this session",
agent.name
) })
.await;
Expand Down
2 changes: 1 addition & 1 deletion crates/agent/src/codex.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ async fn initialize(
"id": 1,
"method": "initialize",
"params": {
"clientInfo": { "name": "tcode", "title": "tcode", "version": env!("CARGO_PKG_VERSION") },
"clientInfo": { "name": "tcode", "title": "Tcode", "version": env!("CARGO_PKG_VERSION") },
"capabilities": { "experimentalApi": true }
}
}),
Expand Down
8 changes: 4 additions & 4 deletions crates/agent/src/opencode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ impl SessionActor for OpenCodeActor {
SessionCommand::Rewind { .. } => {
self.events
.emit(AgentEvent::Warning {
message: "OpenCode rewind is not exposed by tcode's native adapter".into(),
message: "OpenCode rewind is not exposed by Tcode's native adapter".into(),
})
.await;
Ok(())
Expand Down Expand Up @@ -478,7 +478,7 @@ impl OpenCodeActor {
for request_id in pending {
let _ = self.server.http.post_json(
&format!("/permission/{request_id}/reply"),
&json!({"reply":"reject","message":"tcode session closed"}),
&json!({"reply":"reject","message":"Tcode session closed"}),
);
}
self.server.stop();
Expand Down Expand Up @@ -1709,12 +1709,12 @@ fn opencode_config_content(
Some(inline) => {
let config: Value = serde_json::from_str(&inline).map_err(|err| {
AgentError::Protocol(format!(
"cannot merge tcode MCP servers into OPENCODE_CONFIG_CONTENT: {err}"
"cannot merge Tcode MCP servers into OPENCODE_CONFIG_CONTENT: {err}"
))
})?;
if !config.is_object() {
return Err(AgentError::Protocol(
"cannot merge tcode MCP servers into non-object OPENCODE_CONFIG_CONTENT".into(),
"cannot merge Tcode MCP servers into non-object OPENCODE_CONFIG_CONTENT".into(),
));
}
config
Expand Down
4 changes: 2 additions & 2 deletions crates/agent/src/pi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ async fn run_actor(
actor.events
.emit(AgentEvent::Warning {
message: format!(
"pi has no MCP client of its own, so tcode's {} tools are unavailable in this session",
"pi has no MCP client of its own, so Tcode's {} tools are unavailable in this session",
unattached.join(", ")
),
})
Expand Down Expand Up @@ -501,7 +501,7 @@ impl SessionActor for PiActor {
SessionCommand::Rewind { .. } => {
self.events
.emit(AgentEvent::Warning {
message: "pi rewind is not exposed by tcode's native adapter".into(),
message: "pi rewind is not exposed by Tcode's native adapter".into(),
})
.await;
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/android/host/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
android:enableOnBackInvokedCallback="false"
android:hasCode="true"
android:icon="@mipmap/ic_launcher"
android:label="tcode"
android:label="Tcode"
android:supportsRtl="true"
android:theme="@style/Theme.Tcode"
android:usesCleartextTraffic="true">
Expand Down
9 changes: 4 additions & 5 deletions crates/app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,9 @@ fn main() {
});
}
#[cfg(target_os = "macos")]
cx.set_menus([gpui::Menu::new("tcode").items([gpui::MenuItem::action(
tcode_ui::tr!("quit.menu_item"),
Quit,
)])]);
cx.set_menus([gpui::Menu::new(tcode_ui::tr!("app.name")).items([
gpui::MenuItem::action(tcode_ui::tr!("quit.menu_item"), Quit),
])]);
// Process ownership, not the window's current attachment, grants
// authority to stop the local kernel on application quit.
let quit_subscription = cx.on_app_quit({
Expand Down Expand Up @@ -487,7 +486,7 @@ fn main() {
WindowSeam::flush(),
ShellOptions {
window: window_options,
title: "tcode".into(),
title: tcode_ui::tr!("app.name").into(),
fonts: application_fonts,
theme_json,
activate: true,
Expand Down
2 changes: 1 addition & 1 deletion crates/computer-use-mcp/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ pub fn list_roots(filters: &RootFilters) -> Result<Vec<RootInfo>, BackendError>
if filters.pid == Some(own_pid) {
return Err(BackendError::new(
BackendErrorCode::RootNotFound,
"the tcode host process cannot observe itself; launch a separate instance to drive it",
"the Tcode host process cannot observe itself; launch a separate instance to drive it",
));
}
#[cfg(target_os = "macos")]
Expand Down
8 changes: 4 additions & 4 deletions crates/computer-use-mcp/src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ impl ComputerUseTools {
#[tool(
description = "Find and rank desktop window roots, returning @rN references; call this before observe_ui when the target is not the frontmost window. \
This server exposes desktop windows only, so use the tcode_preview tools for web pages. \
On macOS, grant Accessibility for all tools and Screen Recording for screenshots in tcode Settings → Computer Use; Windows needs no permissions, and other platforms are unsupported."
On macOS, grant Accessibility for all tools and Screen Recording for screenshots in Tcode Settings → Computer Use; Windows needs no permissions, and other platforms are unsupported."
)]
async fn find_roots(&self, Parameters(params): Parameters<RootFilters>) -> CallToolResult {
let permissions = permissions();
Expand Down Expand Up @@ -231,7 +231,7 @@ impl ComputerUseTools {
Use find_roots → observe_ui, query that cached state with search_ui/expand_ui/inspect_ui, then use act_ui/wait_for and observe again; those cached queries do not touch the live UI. \
Every @e ref belongs to its producing state_id; observations are immutable and kept in a bounded LRU (default 8), so an evicted or stale state or a ref from another state requires a fresh observe_ui. \
This server exposes desktop windows only, so use the tcode_preview tools for web pages. \
On macOS, grant Accessibility for all tools and Screen Recording for screenshots in tcode Settings → Computer Use; Windows needs no permissions, and other platforms are unsupported."
On macOS, grant Accessibility for all tools and Screen Recording for screenshots in Tcode Settings → Computer Use; Windows needs no permissions, and other platforms are unsupported."
)]
async fn observe_ui(&self, Parameters(params): Parameters<ObserveUiParams>) -> CallToolResult {
let permissions = permissions();
Expand Down Expand Up @@ -749,12 +749,12 @@ fn permission_gate(
) -> Option<CallToolResult> {
if needs_accessibility && !permissions.accessibility {
return Some(tool_error(
"Accessibility permission is missing; grant it in tcode Settings → Computer Use.",
"Accessibility permission is missing; grant it in Tcode Settings → Computer Use.",
));
}
if needs_screen_recording && !permissions.screen_recording {
return Some(tool_error(
"Screen Recording permission is missing; grant it in tcode Settings → Computer Use.",
"Screen Recording permission is missing; grant it in Tcode Settings → Computer Use.",
));
}
None
Expand Down
4 changes: 2 additions & 2 deletions crates/ios/host/Sources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
<key>NSBonjourServices</key>
<array><string>_tcode._tcp</string></array>
<key>NSLocalNetworkUsageDescription</key>
<string>查找同一网络中的 tcode 执行端以进行配对。</string>
<string>查找同一网络中的 Tcode 执行端以进行配对。</string>
<key>NSCameraUsageDescription</key>
<string>Scan a QR code to pair with a tcode host.</string>
<string>Scan a QR code to pair with a Tcode host.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
4 changes: 2 additions & 2 deletions crates/orchestrate-mcp/src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl OrchestrateTools {
}

#[tool(
description = "Dispatch concrete execution work to an enabled execution-model profile in a new child tcode thread. Use collaborate for peer decision discussions. Dispatch a brief to the thread and return its thread id. profile is the provider-profile id from the fleet table, required when the entry names one. access is one of read_only (review/investigation: read-only actions run without prompts; anything that mutates pauses for user approval), workspace_write (edits auto-approved inside the workspace), or full (default; no approval prompts). worktree optionally isolates the child in tcode/<thread-id> and overrides the Orchestrate setting; the response identifies the path and branch or explains fallback. Completed children are auto-archived after their result is delivered unless archive_on_complete: false; failed children stay visible for retries. fast overrides the profile's fast-mode setting for this child; use it only on the user's explicit instruction."
description = "Dispatch concrete execution work to an enabled execution-model profile in a new child Tcode thread. Use collaborate for peer decision discussions. Dispatch a brief to the thread and return its thread id. profile is the provider-profile id from the fleet table, required when the entry names one. access is one of read_only (review/investigation: read-only actions run without prompts; anything that mutates pauses for user approval), workspace_write (edits auto-approved inside the workspace), or full (default; no approval prompts). worktree optionally isolates the child in tcode/<thread-id> and overrides the Orchestrate setting; the response identifies the path and branch or explains fallback. Completed children are auto-archived after their result is delivered unless archive_on_complete: false; failed children stay visible for retries. fast overrides the profile's fast-mode setting for this child; use it only on the user's explicit instruction."
)]
async fn dispatch(&self, Parameters(p): Parameters<DispatchParams>) -> CallToolResult {
run_op(
Expand Down Expand Up @@ -349,7 +349,7 @@ impl ServerHandler for OrchestrateTools {
ServerInfo::new(ServerCapabilities::builder().enable_tools().build())
.with_protocol_version(ProtocolVersion::LATEST)
.with_server_info(Implementation::from_build_env())
.with_instructions("Prefer tcode Orchestrate for cross-provider peer collaboration and execution dispatch. Use collaborate for decision discussions, dispatch for implementation, and send to continue either thread.")
.with_instructions("Prefer Tcode Orchestrate for cross-provider peer collaboration and execution dispatch. Use collaborate for decision discussions, dispatch for implementation, and send to continue either thread.")
}
}

Expand Down
6 changes: 3 additions & 3 deletions crates/preview-mcp/src/tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,15 +198,15 @@ impl PreviewTools {
}

#[tool(
description = "Open the tcode preview browser, optionally at a URL, and return its status. \
description = "Open the Tcode preview browser, optionally at a URL, and return its status. \
For browser work, call preview_status first and call preview_open if no automation-capable preview is attached before concluding the browser is unavailable. \
Do not fall back to Chrome, Playwright, or another browser merely because the preview is initially closed or a first call fails; fall back only when preview_open explicitly reports unsupported or unavailable."
)]
async fn preview_open(&self, Parameters(params): Parameters<OpenParams>) -> CallToolResult {
self.run(PreviewOp::Open { url: params.url }).await
}

#[tool(description = "Navigate the tcode preview browser to a URL and return its status.")]
#[tool(description = "Navigate the Tcode preview browser to a URL and return its status.")]
async fn preview_navigate(
&self,
Parameters(params): Parameters<NavigateParams>,
Expand Down Expand Up @@ -363,7 +363,7 @@ impl ServerHandler for PreviewTools {
.with_protocol_version(ProtocolVersion::LATEST)
.with_server_info(Implementation::from_build_env())
.with_instructions(
"Drive the tcode embedded preview browser: open/navigate URLs, inspect and \
"Drive the Tcode embedded preview browser: open/navigate URLs, inspect and \
automate the page, resize its canvas, press keys, scroll, wait for page \
conditions, and capture screenshots. For browser work, call preview_status first \
and preview_open when no automation-capable preview is attached; use another \
Expand Down
2 changes: 1 addition & 1 deletion crates/remote/src/client_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ fn resolve_device_name(
clean_name(host_name).and_then(|name| clean_name(Some(strip_local_suffix(name))))
})
.or_else(|| clean_name(etc_hostname))
.unwrap_or_else(|| "tcode".into())
.unwrap_or_else(|| "Tcode".into())
}

fn clean_name(name: Option<String>) -> Option<String> {
Expand Down
2 changes: 1 addition & 1 deletion crates/remote/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ pub fn set_password(
.ok()
.and_then(|bytes| serde_json::from_slice::<serde_json::Value>(&bytes).ok())
.and_then(|value| value["host_name"].as_str().map(str::to_owned))
.unwrap_or_else(|| "tcode".into());
.unwrap_or_else(|| "Tcode".into());
AuthStore::open(data_dir, &name)?.set_password(password, revoke_tokens)
}

Expand Down
6 changes: 3 additions & 3 deletions crates/services/src/export.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ pub(crate) fn read_tcode_export(path: &Path) -> Result<TcodeThreadExport, ReadEx
.map_err(|error| ReadExportError::Invalid(error.to_string()))?;
if header.version != EXPORT_VERSION {
return Err(ReadExportError::Invalid(format!(
"unsupported tcode export version {}",
"unsupported Tcode export version {}",
header.version
)));
}
Expand All @@ -161,7 +161,7 @@ fn parse_event_log(bytes: &[u8]) -> Result<Vec<StoredEvent>, String> {
pub fn render_markdown(meta: &SessionMeta, timeline: &Timeline) -> String {
let model = meta.model.as_deref().unwrap_or("provider default");
let mut output = format!(
"# {}\n\n- Format: tcode Markdown export v1\n- Session ID: `{}`\n- Provider/model: {} / {}\n- Workspace: `{}`\n- Created: {} (Unix seconds)\n- Updated: {} (Unix seconds)\n- Attachments: referenced by recorded local path; file bytes are not embedded.\n- Privacy: no automatic redaction; recorded messages and tool summaries may contain sensitive data. Provider secrets and settings are not included.\n\n",
"# {}\n\n- Format: Tcode Markdown export v1\n- Session ID: `{}`\n- Provider/model: {} / {}\n- Workspace: `{}`\n- Created: {} (Unix seconds)\n- Updated: {} (Unix seconds)\n- Attachments: referenced by recorded local path; file bytes are not embedded.\n- Privacy: no automatic redaction; recorded messages and tool summaries may contain sensitive data. Provider secrets and settings are not included.\n\n",
meta.title,
meta.id,
meta.provider.display_name(),
Expand Down Expand Up @@ -419,7 +419,7 @@ mod tests {
String::from_utf8(rendered).unwrap(),
concat!(
"# Export fixture\n\n",
"- Format: tcode Markdown export v1\n",
"- Format: Tcode Markdown export v1\n",
"- Session ID: `session-export-1`\n",
"- Provider/model: Claude Code / opus\n",
"- Workspace: `/work/project`\n",
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/examples/phone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fn main() {
window_background: WindowBackgroundAppearance::Opaque,
..Default::default()
},
title: "tcode phone".into(),
title: "Tcode phone".into(),
theme_json: Cow::Owned(tcode_ui::flattened_theme_json()),
activate: true,
setup: ShellSetup {
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/material.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ pub fn brand_wordmark(cx: &App) -> impl IntoElement {
.text_size(px(14.))
.font_bold()
.text_color(cx.theme().sidebar_foreground)
.child("tcode"),
.child(crate::tr!("app.name")),
)
.child(
div()
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/provider_status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ mod tests {
assert_eq!(s.headline, "Disabled");
assert_eq!(
s.detail,
"This provider is installed but disabled for new sessions in tcode."
"This provider is installed but disabled for new sessions in Tcode."
);

let missing = ProviderSnapshot {
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Default for ShellOptions {
fn default() -> Self {
Self {
window: WindowOptions::default(),
title: "tcode".into(),
title: crate::tr!("app.name").into(),
fonts: vec![Cow::Borrowed(crate::assets::DM_SANS)],
theme_json: Cow::Borrowed(THEME_JSON),
activate: false,
Expand Down
2 changes: 1 addition & 1 deletion crates/ui/src/sidebar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1171,7 +1171,7 @@ impl SessionsSidebar {
.text_sm()
.font_bold()
.text_color(cx.theme().sidebar_foreground)
.child("tcode"),
.child(crate::tr!("app.name")),
)
.child(
div()
Expand Down
Loading
Loading