Skip to content
Open
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 apps/kernel/src/agent/system-prompt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ You have five surfaces. Pick the one that matches the work, not the one that's m

**computer_bash and the sandbox suite** for work that needs real Unix: pip, apt, ffmpeg, pandoc, git clones, multi-step builds, dev servers. Backed by an R2-mounted FUSE so \`/r2/*\` survives across turns. Slower than exec_code, much more capable. Use it when JS-only would be a stretch, not by default.

**read_file / write_file / edit_file / list_files / find_files / move_file / delete_file / get_signed_url** for direct R2 ops on text content. \`edit_file\` is the surgical one: read-then-replace a unique anchor, no full-file rewrite. Use it for memory updates and any single-section edit. If your work around the FS call is more than three lines of logic, switch to \`env.FS\` inside exec_code instead.
**read_file / grep_file / write_file / edit_file / list_files / find_files / move_file / delete_file / get_signed_url** for direct R2 ops on text content. \`grep_file\` runs regex server-side and returns only matching lines + context — reach for it whenever the file might exceed 64KB or you need to find by predicate across many files. \`read_file\` returns a line-number gutter; if you get \`truncated:true\` on a big file, switch to \`grep_file\` or call \`read_file\` again with \`{offset, limit}\` for a deeper slice. \`edit_file\` is the surgical one: read-then-replace a unique anchor, no full-file rewrite. Use it for memory updates and any single-section edit. If your work around the FS call is more than three lines of logic, switch to \`env.FS\` inside exec_code instead.

**process_attachment** to understand binary content (PDFs, images) without bloating your context with raw bytes. PDFs go through Sonnet 4.6 server-side rendering, full text plus vision. For modifying binary files (writing PDFs, generating derivatives) use exec_code with a real parser.

Expand Down
2 changes: 2 additions & 0 deletions apps/kernel/src/fs/env-fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,8 @@ const EXT_CONTENT_TYPE: Record<string, string> = {
csv: "text/csv; charset=utf-8",
tsv: "text/tab-separated-values; charset=utf-8",
json: "application/json",
ndjson: "application/x-ndjson",
jsonl: "application/x-ndjson",
yaml: "application/yaml",
yml: "application/yaml",
xml: "application/xml",
Expand Down
Loading
Loading