Skip to content

Add Cowork support, refactor into modules - #91

Open
zackman0010 wants to merge 13 commits into
simonw:mainfrom
zackman0010:main
Open

Add Cowork support, refactor into modules#91
zackman0010 wants to merge 13 commits into
simonw:mainfrom
zackman0010:main

Conversation

@zackman0010

Copy link
Copy Markdown

@houfu added Cowork support in his fork, which I used as the base for my fork. Updates to his code include multi-OS support (the original was Mac only) and a refactor of the code into separate modules for easier readability.

houfu and others added 13 commits February 27, 2026 11:02
Adds find_cowork_sessions() to discover sessions from
~/Library/Application Support/Claude/local-agent-mode-sessions/
and a new `cowork` CLI command that mirrors `local` but uses
the Cowork metadata (title, folders) for display.

The existing _parse_jsonl_file() and generate_html() work
unchanged — Cowork JSONL uses the same format as Claude Code,
with queue-operation entries already filtered out.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds find_cowork_session_by_process_name() helper and a --process-name
option to the cowork command that skips the interactive picker entirely.

From within a Cowork wrap-up step:
  claude-code-transcripts cowork --process-name "$(basename $PWD)" -a -o ~/Documents/Transcripts

The processName is extracted from the virtual $PWD (/sessions/{processName})
that Cowork sets for running agents.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add transcript_label parameter to generate_html() so the cowork
command renders "Claude Cowork transcript" instead of "Claude Code
transcript" in titles and headings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move renderer, generator, templates, static/, and Jinja2 templates
  into html_generation/ subpackage
- Expose public API via html_generation/__init__.py (Session, Project,
  generate_html, generate_batch_html, inject_gist_preview_js, create_gist)
- Prefix all internal names with _ across renderer, generator, templates
- Add Session/Project dataclasses; callers now build and pass these in,
  removing parse_session_file from generator
- parse_session_file now returns loglines list directly instead of dict
- Move detect_github_repo into generator as _detect_github_repo,
  removing the html_generation -> api dependency
- Add Windows/Linux support for cowork sessions via platformdirs
- Handle _audit_timestamp fallback and isMeta/isSynthetic skipping
  in parser
- Add platformdirs dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…icker

- Move all commands into commands/ subpackage with pkgutil auto-discovery
- Add shared decorator hierarchy: output_options < interactive_options < local_options
- Unify local and cowork pickers: local now shows both Code and Cowork sessions with source column
- Add --source flag to local (code/cowork/filepath) and all (same semantics)
- Add code and cowork proxy commands that delegate to local with preset source
- Add Cowork session support to all batch command with include_json support
- Make find_cowork_sessions limit optional (default: all)
- Add transcript_label to Session dataclass; batch HTML uses it per session
- Add pytest-cov; add htmlcov/ to .gitignore
- Add tests for source flag filtering, proxy commands, include_json behavior

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Presents an interactive picker listing all projects with session counts,
then converts only the chosen project using the same batch HTML generation
as the all command. Supports --json, --output, and --open flags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds collect_raw_projects, build_project, and copy_jsonl_files helpers
to eliminate duplication between the two batch conversion commands.
Updates test patch targets to match new import locations.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…_init__.py

Eliminates identical output-resolution, gist-publishing, and browser-opening
blocks duplicated across local, file, and web commands.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ce docs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants