Repository navigation
fix(tui): show browser tool calls in the person's language - #260
Conversation
The browser tool's row in the TUI fell through to the generic row: the raw tool name and its input in English, in a Korean session too. The TUI now draws it through its dictionaries, from the input and the browser kind the engine puts in the tool metadata: - en: "Browser open https://example.com (in your Chrome)" / "(in the built-in browser)" - ko: "브라우저 열기 https://example.com (내 크롬에서)" / "(내장 브라우저에서)" - every action has its word (열기, 읽기, 클릭, 입력, 스크롤, 기다리기, 스크린샷); while running: "브라우저를 쓰는 중..." / "Using the browser..." The engine's metadata.browser is now "chrome" | "own" (was "extension" | "chromium"; nothing read it). The plain title stays for other clients, and the result line the model reads stays English.
|
Self-review.
|
…l waits While a browser call waits for Allow in the person's Chrome, the TUI shows the code under the row, and it goes away on Allow, deny, expiry or fallback: - ko: "크롬에서 허용을 눌러 주세요 (코드 123456). 컴퓨터 알림과 레드롭 확장 옆 패널에 떠요." - en: "Press Allow in Chrome (code 123456). It shows in a system notification and in the Redrob extension's side panel." The tool polls the daemon link (GET /desk/status, or in process) while its first request waits and streams the code as running metadata (metadata.pairing). When no Chrome with the extension is in the account, the first fallback of a session says how to connect: a line in the result for the model to pass on, and metadata.connect for the TUI: - ko: "내 크롬을 쓰려면 크롬에 레드롭 확장을 설치하고, 확장 설정의 레드롭 챗에서 같은 레드롭 계정으로 연결해 주세요." - en: "To use your own Chrome, install the Redrob extension in Chrome and connect it with the same Redrob account (extension Settings → Redrob chat → Connect)." The link now expires a pairing request after the extension's ten minutes on its own, even when desk.denied expired never arrives, and the next call sends a fresh request with a new key and code. A later call while the same request still waits waits 20 s (was 0), so the code shows and an Allow is caught. A find request that did not reach the extension no longer waits a second time.
|
Self-review of the second commit.
|
What's doneFollow-up to #257 ('한국어는?'), and the Chrome link happening by itself while the person chats. 1. Browser rows in the TUI follow its language. A new
2. A live notice while the tool waits for Allow (
3. How to connect, once per session, when no Chrome with the extension is in the account (
4. A fresh request by itself after expiry. The link expires a pairing request after the extension's ten minutes even when What's not done
What to review
Checks
|
What's done
Follow-up to #257 ('한국어는?'). A browser tool call's row in the TUI now follows the TUI's language. Before, the generic row showed the raw
browser open https://…in a Korean session too.Browserrow (icon◎), drawn bybrowserLabel()inpackages/tui/src/util/tool-display.tsthrough the dictionaries:Browser open https://example.com (in your Chrome),(in the built-in browser); pendingUsing the browser...브라우저 열기 https://example.com (내 크롬에서),(내장 브라우저에서); pending브라우저를 쓰는 중...metadata.browser:"chrome" | "own". It was"extension" | "chromium", and nothing read it. The plaintitlestays for non-TUI clients.What's not done
redrob desk status(and theredrob runlines) stay English. The CLI has no Korean string or locale helper anywhere (packages/redrob/src/clihas no Hangul), so per the instruction no new CLI i18n system was added.Browser: …) stays English on purpose.{name}에서 이 브라우저를 쓰려고 해요); the device nameRedrob Code on <host>is kept as a product name.What to review
(내 크롬에서)reads well after the URL.Intentions
Checks
test/util/tool-display.test.ts: 4 new tests (en and ko, chrome, own, no kind yet, every action has a Korean word). The 12 failures intest/i18nare the same 12 as on origin/develop (49 pass on develop, 53 here).tsgo --noEmitin tui and redrob.◎ 브라우저 열기 https://example.com (내장 브라우저에서)◎ Browser open https://example.com (in the built-in browser)and◎ Browser read https://example.com/ (in the built-in browser)(내 크롬에서)/(in your Chrome)is covered by the unit test; Linux has no linked Chrome.