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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Switch modes with `/mode <name>`, use shortcut aliases (`/plan`, `/agent`, `/res
| Tool | Category | Description |
|------|----------|-------------|
| `ls` | ReadOnly | List directory contents |
| `read` | ReadOnly | Read file content (also loads images for multimodal models) |
| `read` | ReadOnly | Read file content (loads images for multimodal models; renders `.ipynb` with base64 outputs stripped) |
| `grep` | ReadOnly | Search with regex across files |
| `glob` | ReadOnly | Find files by glob pattern |
| `web_search` | ReadOnly | Search the web (requires Ollama API key) |
Expand Down
1 change: 1 addition & 0 deletions TINYHARNESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ Three crates in a Cargo workspace:
- **Ctrl+C**: Interrupts current LLM generation; second Ctrl+C exits immediately.
- **Configuration**: Stored as JSON in `<config_dir>/settings.json` (`$XDG_CONFIG_HOME/tinyharness/`, else `~/.config/tinyharness/`). Changed via CLI flags (`--url`, `--api-key`), slash commands (`/model`, `/apikey`, `/timeout`, `/retries`, `/contextlimit`, `/autoaccept`, `/settings`, …), or by editing the file. There is no interactive setup wizard; Sockudo credentials are settings-file-only. Persistent prompts are seeded from embedded defaults into `<config_dir>/prompts/`. All locations resolve through `paths::Paths`.
- **Image attachments**: Base64 data URIs, used by multimodal models; set via `/image`.
- **Notebook reads**: `read` renders `.ipynb` files with binary outputs (`image/*`, `application/pdf`) replaced by placeholders and text values over 4,000 chars truncated — a single cell's base64 figure is otherwise hundreds of KB and can exceed the provider's input-length limit. `from`/`to` index the rendered text, not the file on disk. Invalid JSON falls back to per-line truncation.
- **`async_command!` macro**: Registers commands that need `provider.lock().await`.
- **`CommandResult` variants**: `SwitchSession`, `RenameSession`, `Init`, `SkillUse`, `SkillUnload` carry data back to the agent loop.
- **`CommandContext`** holds shared mutable state: provider, mode, file context, session ID, skill registry, active skills, pending images, thinking toggle, compaction token usage, workspace context, `paths` (all filesystem locations; `prompts_dir()` derives from it), output writer, exit flag.
Expand Down
2 changes: 2 additions & 0 deletions docs/tools-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ Lists the contents of a single directory. Returns newline-separated file and dir

Reads file content with optional line ranges. For image files (png, jpg, webp, gif, bmp), returns a description and the image data is automatically loaded for the model to view.

Jupyter notebooks (`.ipynb`) are rendered as JSON with embedded binary outputs (every `image/*` and `application/pdf` payload) replaced by a `[stripped … base64 chars]` placeholder, and remaining output values longer than 4,000 characters truncated. Cell sources, stream text, `text/plain` results and execution counts are preserved. A single notebook cell can otherwise embed several hundred KB of base64 on one line and push the request past the provider's input limit. If the file is not valid JSON, oversized lines are truncated instead. `from`/`to` index the **rendered** text, not the file on disk, so line numbers stay stable across reads.

| Parameter | Required | Description |
|-----------|----------|-------------|
| `path` | Yes | The absolute path to the file |
Expand Down
Loading
Loading