You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,10 @@ The UI morphs between two states: a compact spotlight-style input bar → an exp
60
60
-**`config/commands.ts`** — slash command registry: defines supported commands and the `SCREEN_CAPTURE_PLACEHOLDER` sentinel used to show a loading tile in chat while a `/screen` capture is in flight
61
61
-**`components/CommandSuggestion.tsx`** — slash command autocomplete popover. Contains `iconForTrigger()`, a switch statement mapping trigger strings to inline SVG constants. **Every new slash command needs a dedicated case here.** Without it, the command falls through to the default, which returns `SCREEN_ICON` (the monitor icon). Steps: (1) add a hoisted `const FOO_ICON = (<svg .../>)` constant, (2) add `case '/foo': return FOO_ICON;` to `iconForTrigger()`.
62
62
63
+
### Slash commands
64
+
65
+
User-facing reference for all commands lives in `docs/commands.md`. **Any new slash command must go through the same unified dispatch flow as the existing ones in `src/App.tsx`** (shared pre-flight in `handleSubmit`, then a command-specific stage-2 handler). Do not add a bespoke submit path; extend the existing dispatch instead. This keeps gating, deferral, capability checks, and cancellation behavior consistent across every command.
66
+
63
67
### Backend (`src-tauri/src/`)
64
68
65
69
-**`lib.rs`** — app setup: loads `AppConfig` via `config::load`, converts window to NSPanel (fullscreen overlay), registers tray, spawns hotkey listener, intercepts close events (hides instead of quits)
Copy file name to clipboardExpand all lines: docs/commands.md
+19-1Lines changed: 19 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,10 @@ Commands that operate on text follow a consistent input priority:
14
14
15
15
This means you can highlight text anywhere on screen, summon Thuki with double-tap Control, type a command, and hit Enter without retyping the selected content.
16
16
17
+
## Image input on text-only models
18
+
19
+
`/extract`, `/tldr`, `/translate`, `/rewrite`, `/refine`, `/bullets`, `/todos`, and `/explain` read attached images locally via macOS Vision OCR, so they work even when the active model has no vision capability. Only plain submits and `/screen` alone require a vision model to read images. See [OCR-supported commands](./ocr-commands.md) for the full list and details.
20
+
17
21
## /search
18
22
19
23
Runs agentic web search and answers from live sources with citations.
@@ -97,9 +101,11 @@ Translates text to another language.
97
101
98
102
**Behavior:** Outputs only the translation with no commentary or explanation.
99
103
104
+
**Composable:**`/translate` works with attached images or `/screen`. Vision OCR extracts the text first; translation runs on the result. Omitting a target language defaults to Vietnamese.
105
+
100
106
**Language format:** The target language can be a full name (`French`), ISO code (`fr`, `fra`), or common shorthand.
101
107
102
-
**Default behavior:** If no language is specified, non-English input translates to English and English input translates to Vietnamese.
108
+
**Default behavior:** If no language is specified, the text is translated to Vietnamese.
103
109
104
110
---
105
111
@@ -115,6 +121,8 @@ Rewrites text to read more naturally and clearly.
115
121
116
122
**Behavior:** Preserves the original meaning while improving flow and readability. Outputs only the rewritten text.
117
123
124
+
**Composable:**`/rewrite` works with attached images or `/screen`. Vision OCR extracts the text first, then rewrites it.
125
+
118
126
---
119
127
120
128
## /tldr
@@ -129,6 +137,8 @@ Summarizes text into 1-3 short, direct sentences.
129
137
130
138
**Behavior:** Captures the core message, key decision, or critical takeaway. Skips background detail and qualifications.
131
139
140
+
**Composable:**`/tldr` works with attached images or `/screen`. Vision OCR extracts the text first, then summarizes it.
141
+
132
142
---
133
143
134
144
## /refine
@@ -143,6 +153,8 @@ Fixes grammar, spelling, and punctuation while preserving your voice.
143
153
144
154
**Behavior:** Corrects errors and smooths rough phrasing without restructuring or adding new ideas. Your original tone and meaning stay intact.
145
155
156
+
**Composable:**`/refine` works with attached images or `/screen`. Vision OCR extracts the text first, then refines it.
157
+
146
158
---
147
159
148
160
## /bullets
@@ -157,6 +169,8 @@ Extracts key points from text as a markdown bullet list.
157
169
158
170
**Behavior:** Each point is a concise, self-contained statement. Ordered by importance or logical sequence. Filler and repetition are removed. Output uses `- ` prefixed markdown bullets.
159
171
172
+
**Composable:**`/bullets` works with attached images or `/screen`. Vision OCR extracts the text first, then extracts key points.
173
+
160
174
---
161
175
162
176
## /explain
@@ -172,6 +186,8 @@ Explains any concept, term, or code snippet in plain language, always with a con
172
186
173
187
**Behavior:** Outputs a brief explanation followed by at least one concrete example. Assumes no background knowledge. Skips jargon or defines it when unavoidable. No intro or sign-off.
174
188
189
+
**Composable:**`/explain` works with attached images or `/screen`. Vision OCR extracts the text first, then explains it.
190
+
175
191
---
176
192
177
193
## /todos
@@ -185,3 +201,5 @@ Summarizes what a piece of text is about, then extracts every task, action item,
185
201
-`/todos [paste a conversation or notes]`: processes typed or pasted content
186
202
187
203
**Behavior:** Responds in two parts: a short paragraph explaining the context and what is at stake, followed by a `- [ ]` checkbox list of all tasks. Each to-do includes who is responsible, plus any deadline or timeframe if mentioned.
204
+
205
+
**Composable:**`/todos` works with attached images or `/screen`. Vision OCR extracts the text first, then extracts to-dos.
0 commit comments