Skip to content

Plural views view_files/view_cells; view_file stays as the Anthropic-style single-file form - #887

Open
ncoop57 wants to merge 8 commits into
mainfrom
view-files
Open

Plural views view_files/view_cells; view_file stays as the Anthropic-style single-file form#887
ncoop57 wants to merge 8 commits into
mainfrom
view-files

Conversation

@ncoop57

@ncoop57 ncoop57 commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Views take one or more targets under the plural name:

  • view_files(*paths, ...): each file shown under a # file <path> header when several, with any line range applied to each file separately; a single path renders bare
  • view_cells(path, *cell_ids, ...): same treatment with # cell <id> headers; replaces the view_cell function (the Notebook.view_cell method is unchanged)

view_file stays exactly as on main: the single-file form keeps the name and positional start_line/end_line established by Anthropic's text editor tool, which models have seen a lot. The editskill Naming section states both the plural rule and this exception.

Breaking change: the view_cell function is renamed to view_cells (no alias), and start_line/end_line are keyword-only on the plural views.

Changes

  • nbs/12_tools.ipynb: view_files delegates per path to the unchanged view_file
  • nbs/13_nbio.ipynb: single-cell rendering moves to _view_cell; view_cells loops *cell_ids (headers use resolved ids)
  • fastcore/editskill.py: exports and Naming convention text updated

All new tests run red-green.

Note for review: this branch predates main's exec_cell/show_cell additions to 13_nbio.ipynb, so the regenerated nbio.py currently shows them as removed; merging main into the branch will clear that from the diff.

@ncoop57 ncoop57 changed the title Add view_files for viewing several files in one call view_file takes several paths via *args Aug 3, 2026
@ncoop57
ncoop57 marked this pull request as draft August 3, 2026 18:29
@ncoop57
ncoop57 marked this pull request as ready for review August 3, 2026 18:34
@ncoop57 ncoop57 changed the title view_file takes several paths via *args Singular views take several targets via *args Aug 3, 2026
@ncoop57 ncoop57 changed the title Singular views take several targets via *args Plural views view_files/view_cells; view_file stays as the Anthropic-style single-file form Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant