mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-21 16:02:20 +00:00
* feat(agents): wire hooks, resume and detection for Kimi Code Kimi Code CLI takes its hooks as [[hooks]] entries in the same config.toml that holds the user's providers and models, so this adds a third install strategy — a format-preserving TOML merge on toml_edit — beside the JSON map merge and the owned files. Like Qwen it reports permission requests first-class, so it gets no Notification hook. Resume rides `kimi --session <id>`; fork stays unwired, Kimi documents none. Closes #693 Signed-off-by: Austin Spraggins <spragginsdesigns@gmail.com> * fix(agents): harden the Kimi Code TOML hook merge and its resume flags The TOML merge strategy the Kimi wiring introduces round-trips a shared config.toml cleanly, but three gaps sat behind it. `hooks_state` counted only the marked entries that still named an event, so a hand-edit that dropped the key off one of nine entries left the remaining eight matching the roster exactly and the file reported Installed with a broken entry in it. Every marked entry now counts, which is what the JSON merge already did and what `refresh_hooks` needs to see. A `hooks = []` spelled as an empty inline array made install fail outright -- toml_edit keeps an empty array and an array of tables apart, but the two say the same thing and neither carries any configuration. It is now promoted rather than refused. Every other wrong-shaped `hooks` key -- a string, a table, a non-empty inline array -- still refuses with the file left byte-for-byte alone. `Stop` is not the only way a Kimi turn ends: its own event reference says `Stop` does not fire on interrupts and `Interrupt` fires instead, and a turn that dies on an error reports `StopFailure`. Without those two an Esc or a failed turn left the pane on "working" for good and `tty7 wait` could only ever time out. Both are observation-only events and report the same end of turn `Stop` does. On resume, `--agent` and `--agent-file` join the stale flags: Kimi rejects either next to `--session` at startup, and resuming rebinds the session agent by itself, so replaying them turned a working resume into a launch error. Tests cover the wrong-shaped `hooks` keys, a config.toml that does not parse on both install and uninstall, a file that does not exist yet, a second install being byte-for-byte the first, mangled and surplus marked entries, an uninstall threading between the user's own entries and the tables after them, and the `--session=<id>`, bare `--session`, `--continue` and `--agent` spellings on the resume path. --------- Signed-off-by: Austin Spraggins <spragginsdesigns@gmail.com> Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
129 lines
5.2 KiB
Plaintext
129 lines
5.2 KiB
Plaintext
---
|
|
title: "First launch"
|
|
description: "The handful of settings worth changing before you start working."
|
|
---
|
|
|
|
Open tty7 and you get a window with one tab and one shell, and a tab sidebar
|
|
down the left. Everything below is optional — but these are the settings people
|
|
end up changing anyway, so they are worth five minutes now.
|
|
|
|
Open Settings with <kbd>⌘ ,</kbd> (<kbd>Ctrl ,</kbd> on Windows and Linux), or
|
|
from the command palette (<kbd>⌘ P</kbd> → *Settings*).
|
|
|
|
<Frame caption="Placeholder — screenshot: the Settings window, Appearance section">
|
|
<img src="/images/placeholder.svg" alt="tty7 Settings" />
|
|
</Frame>
|
|
|
|
## 1. Pick a theme
|
|
|
|
**Settings → Appearance → Theme.** Nine themes ship built in — Light, One Light,
|
|
Catppuccin Latte, Rosé Pine Dawn, Dark, Dracula, Harbor, One Dark Pro, and
|
|
Rosé Pine. The default is **Light**.
|
|
|
|
Turn on **Sync with system** to pick a light theme and a dark theme separately;
|
|
tty7 then follows the OS appearance live.
|
|
|
|
Transparency lives on the same page, under **Transparency** — opacity applies to
|
|
every theme, and *Follow theme* hands the decision back to the theme's own
|
|
setting. On Windows there is also a **Background material** picker (Mica,
|
|
Acrylic, and friends).
|
|
|
|
[More about themes →](/customization/themes)
|
|
|
|
## 2. Choose your shell
|
|
|
|
**Settings → Terminal → Shell.** Leave **Program** empty to use the platform
|
|
default. Otherwise it takes an executable name on PATH or an absolute path
|
|
(`zsh`, `fish`, `pwsh`, `nu`, `/opt/homebrew/bin/bash`), plus **Arguments** —
|
|
`-l` for a login shell, say. Arguments split the way a command line splits, so
|
|
quote anything that contains a space: `-c "echo hi"` is two arguments, not
|
|
three.
|
|
|
|
**Start in** decides what a *fresh* shell opens in: tty7's launch directory
|
|
(the default), your home folder, or a fixed path. New tabs and splits keep
|
|
inheriting the active pane's directory either way.
|
|
|
|
## 3. macOS only: decide what Option does
|
|
|
|
**Settings → Input → Keyboard → Option (⌥) acts as Meta.**
|
|
|
|
Off (the default), <kbd>⌥ B</kbd> types `∫`, which is what macOS has always
|
|
done. On, it sends the escape chord shells expect, so <kbd>⌥ B</kbd> moves back
|
|
a word and <kbd>⌥ ⌫</kbd> deletes one. Turn it on if you live in readline;
|
|
leave it off if you type accented characters.
|
|
|
|
## 4. If you use coding agents, install the hooks
|
|
|
|
**Settings → Agents.** tty7 detects 19 coding CLIs by process name on its own —
|
|
you get brand avatars and tab labels for free. The *status dots*, the "needs
|
|
your permission" notifications, and `tty7 wait` all need one more thing: a small
|
|
hook the agent calls to report what it is doing.
|
|
|
|
Click **Install** next to Claude Code, Codex, Copilot CLI, OpenCode, Pi, Grok
|
|
Build, or Oh My Pi. It writes into that agent's own config directory and can be
|
|
removed from the same row.
|
|
|
|
[More about agents →](/agents/status)
|
|
|
|
## 5. Know what Quit does
|
|
|
|
Plain **Quit** closes the window and leaves the background server running.
|
|
Your shells, builds, and agent turns keep going, and reopening tty7 reattaches
|
|
to them.
|
|
|
|
To actually stop everything, use **Quit and Stop Server…** from the tray icon's
|
|
menu. It says so plainly before it does it: anything still running in your
|
|
shells is terminated, while your tabs and layout are kept and reopen with fresh
|
|
shells.
|
|
|
|
<Note>
|
|
This is why there is no tmux in the picture. The persistence is not a feature
|
|
of your shell setup — it belongs to the server underneath.
|
|
[Core concepts →](/getting-started/concepts)
|
|
</Note>
|
|
|
|
## 6. Tune the notifications
|
|
|
|
**Settings → Window & Tabs → Notifications.** By default tty7 posts a desktop
|
|
notification when a foreground command that ran longer than 10 seconds
|
|
finishes — but only while the window is unfocused. Set **Notify on command
|
|
finish** to *Never* or *Always*, and move the threshold if 10 seconds is the
|
|
wrong number for your work.
|
|
|
|
Agent notifications ("needs your permission…", "finished after 42s") follow the
|
|
same policy.
|
|
|
|
## 7. Coming from tmux?
|
|
|
|
**Settings → Keybindings → Preset → tmux** remaps pane and tab actions onto a
|
|
prefix, <kbd>⌃ B</kbd> by default. <kbd>⌃ B</kbd> <kbd>C</kbd> opens a tab,
|
|
<kbd>⌃ B</kbd> <kbd>%</kbd> splits, <kbd>⌃ B</kbd> then an arrow moves focus.
|
|
|
|
A bare prefix reaches the shell after about a second, and prefix plus an unbound
|
|
key passes straight through — so a tmux binding you did not remap still lands in
|
|
whatever is running.
|
|
|
|
[More about keybindings →](/customization/keybindings)
|
|
|
|
## Where things live
|
|
|
|
| | macOS / Linux | Windows |
|
|
|---|---|---|
|
|
| Settings file | `~/.config/tty7/config.json` | `%APPDATA%\tty7\config.json` |
|
|
| Custom themes | `~/.config/tty7/themes/` | `%APPDATA%\tty7\themes\` |
|
|
|
|
Everything in the Settings window writes to `config.json`, and you can edit it
|
|
by hand instead — see the [configuration reference](/reference/configuration).
|
|
Set `TTY7_CONFIG_DIR` to move the whole directory somewhere else.
|
|
|
|
## Next
|
|
|
|
<CardGroup cols={2}>
|
|
<Card title="Core concepts" icon="cube" href="/getting-started/concepts">
|
|
Workspaces, tabs, panes, and the server that owns them.
|
|
</Card>
|
|
<Card title="The prompt" icon="terminal" href="/terminal/prompt">
|
|
Suggestions, completion, and history search — the part you touch most.
|
|
</Card>
|
|
</CardGroup>
|