Skip to content

Repository files navigation

Scratchpad for Codevisor

A deliberately minimal rich-text scratchpad pane. Every open pane and connected device edits the same durable Yjs document in real time.

Features

  • Tiptap rich-text editing with headings, inline formatting, lists, tasks, quotes, and code
  • One global Yjs document shared across all panes and workspaces
  • Durable storage under CODEVISOR_PLUGIN_DATA_DIR
  • scratchpad_read and revision-safe scratchpad_apply_patch model tools
  • A self-contained monochrome SVG icon inherited by every Scratchpad pane
  • Codevisor theme tokens, small-pane responsiveness, keyboard shortcuts, and accessible controls

Development

npm install
npm run build
codevisor plugin link "$PWD"

The plugin process is started by Codevisor when its pane or one of its tools is first used.

Model patch format

Call scratchpad_read first. It returns json in Tiptap/ProseMirror format and a revision. Apply standard JSON Pointer patches to that JSON:

{
  "base_revision": "revision-from-read",
  "patches": [
    {
      "op": "replace",
      "path": "/content/0/content/0/text",
      "value": "Updated thought"
    }
  ]
}

Supported operations are add, remove, replace, and test. A stale base_revision is rejected so concurrent user edits are never silently overwritten.

License

MIT

About

A minimal, collaborative rich-text scratchpad for Codevisor.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages