-
-
Notifications
You must be signed in to change notification settings - Fork 85
Introduce a "code view" of transcripts (git blame style) #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
btucker
wants to merge
98
commits into
simonw:main
Choose a base branch
from
btucker:feat/code-viewer
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 1 commit
Commits
Show all changes
98 commits
Select commit
Hold shift + click to select a range
58d542b
Add code viewer with git blame-style annotations
btucker 1959dec
Fix JSON escaping in code viewer to prevent script injection
btucker d076aaf
Simplify code viewer to diff-only mode
btucker a27d922
Add progress indicator for large page rendering
btucker 53cfbf7
Add three-pane code viewer with git-based blame and full transcript
btucker 1f1c9ae
Simplify file detection with per-file git repo lookup
btucker 4e78390
Add chunked rendering for transcript pane performance
btucker aecc019
Skip blame highlighting for pre-existing content
btucker d2404e8
Add overflow hidden to index item containers
btucker c2cfa01
Fix truncation for dynamically rendered messages
btucker c571051
Fix blame highlighting to only color actually changed lines
btucker 183c9fa
Add tests for git-based blame attribution
btucker 1592307
Add scrollbar minimap showing blame range locations
btucker ff535c6
currently non-functional codemirror state
btucker 617ae5e
Extract code_view.py module from __init__.py
btucker 13d5516
Apply DRY refactorings: CSS template, helpers for grouping and colors
btucker e44272e
Fix JSON escaping for script tag embedding
btucker a01b324
resolved issue when reconstructing file state from edit operations, i…
btucker 97e5a00
include the prompt number in the code view
btucker 5e2aa58
handling continuation messages properly
btucker 11882a0
update readme
btucker e860505
Fix blame highlighting and strip common prefix from file tree
btucker e0a280c
Handle empty git repo in get_file_content_from_repo
btucker ca2bc04
Extract originalFile from tool results for remote session support
btucker a86705f
Fix JSONL parsing to preserve toolUseResult for remote sessions
btucker 7ebad63
Add test for JSONL parsing preserving toolUseResult
btucker 75b01da
Treat skill expansions (isMeta) as continuations for prompt numbering
btucker bf60b03
Add test for isMeta field preservation in JSONL parsing
btucker 75c7035
Assign blame colors by prompt number, not by operation
btucker f0bf40d
Show assistant context in code viewer tooltips
btucker 45bf3ac
Include thinking blocks in code viewer tooltips
btucker 66a8fad
Fix thinking block persistence across messages in tooltips
btucker 6386951
Add test coverage for build_msg_to_user_html tooltip generation
btucker 0f6dd5b
Accumulate tooltip context blocks across messages
btucker c30d2c9
Keep only most recent thinking and text blocks in tooltips
btucker f210d2c
Color blame sections by assistant context message ID
btucker 155f5c4
Fix edit resync using original_content when reconstruction diverges
btucker f63140b
Add transcript-to-code navigation and improve tooltip rendering
btucker 2ce7e59
Add end-to-end tests for code view using Playwright
btucker 8f034e5
Support local file:// access and add shared search header
btucker 3fe65da
Externalize CSS and JS to reduce HTML file sizes
btucker bdb2521
Exclude code-data.json from gist to reduce API truncation
btucker 7d89b20
Add two-gist strategy for large files to avoid API truncation
btucker 9d95c00
Document two-gist strategy for large sessions in README
btucker a644582
Consolidate templates: move header into base.html, rename code_view.html
btucker 103c8fb
Hide minimap when code doesn't need scrolling
btucker 7503cf3
Add e2e tests for minimap visibility behavior
btucker a8c5fe2
Revert external CSS/JS to inline - simplifies with two-gist strategy
btucker 1272af8
Escape style/script tags in markdown to prevent CSS injection
btucker afeaf02
Use nh3 HTML sanitizer for proper XSS protection in markdown
btucker d541b70
Fix JavaScript syntax error from HTML closing tags in embedded JSON
btucker 890c5e1
Fix HTML comment sequences breaking embedded JSON parsing
btucker f741792
Add line anchor deep-linking support for code view
btucker c42734f
Add loading indicators for code view initialization and file switching
btucker 1967b3b
Improve loading indicators and skip pinned updates during scrolling
btucker 5d50a85
Always show loading indicator when switching files
btucker 38dc582
Filter deleted files using git repo instead of pre-filtering
btucker 4f2e249
Add failing test for relative paths in rm commands
btucker fb99c6d
Fix ValueError when rm commands use relative paths
btucker c2682b8
Add failing tests for filter_deleted_files function
btucker 4e89ea4
Add --exclude-deleted-files flag for code viewer
btucker 3e1a2ed
Document --exclude-deleted-files flag in README
btucker 3f42ce4
Handle large sessions by splitting page data into separate JSON files
btucker 7e86821
remove PR.md
btucker 8c39fc0
Add batched gist uploads and descriptive gist names
btucker 940f423
Add index-data.json for large session index content
btucker df4e7dc
Use templates to exclude content from HTML in large sessions
btucker 151361f
Include content in HTML for local viewing, strip for gist upload
btucker 0126082
Fix gist upload: add files one at a time instead of batching
btucker 2622e65
Add retry logic and delays for gist file uploads
btucker 628d818
Remove vestigial batching code from gist upload
btucker 02ea004
Because of limitations in gistpreview we have to do some backflips to…
btucker 01a2879
we don't need the fancy css/js loading if it's a small session on gis…
btucker 14f31e3
Fix code view performance: don't auto-scroll transcript
btucker 8034b65
Pre-compute prompt_num and color_index server-side for blame ranges
btucker 6f25b95
Fix clicking blame blocks to scroll transcript to corresponding message
btucker 66f5803
Implement windowed transcript rendering with teleportation
btucker d1e51f5
Add prompt numbers to user messages and improve pinned header behavior
btucker 8c5f75b
Fix pinned user message flashing when overlapping next prompt
btucker d08694e
Move prompt number to pinned message label
btucker f7f93d9
Fix teleport to always render up to target message
btucker e35fe6c
Fix URL fragment navigation and use bright yellow highlight
btucker da3972a
Use consistent yellow highlight and skip initial blame highlight
btucker b7b39b1
Add progress output for code view generation
btucker ef27068
Clear progress line when switching phases
btucker ea2d6e6
Change user message heading to "User Prompt #X"
btucker 5aba4e2
Fix prompt number mismatch between tooltip and pinned header
btucker e0978eb
Fix prompt number counting and pinned click after teleportation
btucker 5114ad8
Use server-provided prompt_num instead of client-side counting
btucker b73dcf3
Compute all user prompt numbering at build
btucker 607ce99
Code quality improvements to code_view.py
btucker cb3fe47
Merge upstream/main and adopt URL handling
btucker 58f92a1
Switch from gistpreview to gisthost with simplified JS
claude c8e8bac
Remove two-gist strategy and page-data JSON generation
claude e439e24
Merge pull request #1 from btucker/claude/code-viewer-feature-l90XI
btucker 5551046
Merge upstream/main and refactor rewriteLinks per review
btucker fe10082
Refactor: DRY up generate_html functions
btucker f3903e1
Merge origin/feat/code-viewer with local changes
btucker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -1030,72 +1030,75 @@ def render_message(log_type, message_json, timestamp, prompt_num=None): | |||||||||||||||||||||||||||||||
| return _macros.message(role_class, role_label, msg_id, timestamp, content_html) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # JavaScript to fix relative URLs when served via gistpreview.github.io | ||||||||||||||||||||||||||||||||
| # JavaScript to fix relative URLs when served via gisthost.github.io or gistpreview.github.io | ||||||||||||||||||||||||||||||||
| # Fixes issue #26: Pagination links broken on gisthost.github.io | ||||||||||||||||||||||||||||||||
| GIST_PREVIEW_JS = r""" | ||||||||||||||||||||||||||||||||
| (function() { | ||||||||||||||||||||||||||||||||
| if (window.location.hostname !== 'gistpreview.github.io') return; | ||||||||||||||||||||||||||||||||
| // URL format: https://gistpreview.github.io/?GIST_ID/filename.html | ||||||||||||||||||||||||||||||||
| var hostname = window.location.hostname; | ||||||||||||||||||||||||||||||||
| if (hostname !== 'gisthost.github.io' && hostname !== 'gistpreview.github.io') return; | ||||||||||||||||||||||||||||||||
| // URL format: https://gisthost.github.io/?GIST_ID/filename.html | ||||||||||||||||||||||||||||||||
| var match = window.location.search.match(/^\?([^/]+)/); | ||||||||||||||||||||||||||||||||
| if (!match) return; | ||||||||||||||||||||||||||||||||
| var gistId = match[1]; | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Load CSS from gist (relative stylesheet links don't work on gistpreview) | ||||||||||||||||||||||||||||||||
| document.querySelectorAll('link[rel="stylesheet"]').forEach(function(link) { | ||||||||||||||||||||||||||||||||
| var href = link.getAttribute('href'); | ||||||||||||||||||||||||||||||||
| if (href.startsWith('http')) return; // Already absolute | ||||||||||||||||||||||||||||||||
| var cssUrl = 'https://gist.githubusercontent.com/raw/' + gistId + '/' + href; | ||||||||||||||||||||||||||||||||
| fetch(cssUrl) | ||||||||||||||||||||||||||||||||
| .then(function(r) { if (!r.ok) throw new Error('Failed'); return r.text(); }) | ||||||||||||||||||||||||||||||||
| .then(function(css) { | ||||||||||||||||||||||||||||||||
| var style = document.createElement('style'); | ||||||||||||||||||||||||||||||||
| style.textContent = css; | ||||||||||||||||||||||||||||||||
| document.head.appendChild(style); | ||||||||||||||||||||||||||||||||
| link.remove(); // Remove the broken link | ||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||
| .catch(function(e) { console.error('Failed to load CSS:', href, e); }); | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
| function rewriteLinks(root) { | ||||||||||||||||||||||||||||||||
| (root || document).querySelectorAll('a[href]').forEach(function(link) { | ||||||||||||||||||||||||||||||||
| var href = link.getAttribute('href'); | ||||||||||||||||||||||||||||||||
| // Skip already-rewritten links (issue #26 fix) | ||||||||||||||||||||||||||||||||
| if (href.startsWith('?')) return; | ||||||||||||||||||||||||||||||||
| // Skip external links and anchors | ||||||||||||||||||||||||||||||||
| if (href.startsWith('http') || href.startsWith('#') || href.startsWith('//')) return; | ||||||||||||||||||||||||||||||||
| // Handle anchor in relative URL (e.g., page-001.html#msg-123) | ||||||||||||||||||||||||||||||||
| var parts = href.split('#'); | ||||||||||||||||||||||||||||||||
| var filename = parts[0]; | ||||||||||||||||||||||||||||||||
| var anchor = parts.length > 1 ? '#' + parts[1] : ''; | ||||||||||||||||||||||||||||||||
| link.setAttribute('href', '?' + gistId + '/' + filename + anchor); | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Load JS from gist (relative script srcs don't work on gistpreview) | ||||||||||||||||||||||||||||||||
| document.querySelectorAll('script[src]').forEach(function(script) { | ||||||||||||||||||||||||||||||||
| var src = script.getAttribute('src'); | ||||||||||||||||||||||||||||||||
| if (src.startsWith('http')) return; // Already absolute | ||||||||||||||||||||||||||||||||
| var jsUrl = 'https://gist.githubusercontent.com/raw/' + gistId + '/' + src; | ||||||||||||||||||||||||||||||||
| fetch(jsUrl) | ||||||||||||||||||||||||||||||||
| .then(function(r) { if (!r.ok) throw new Error('Failed'); return r.text(); }) | ||||||||||||||||||||||||||||||||
| .then(function(js) { | ||||||||||||||||||||||||||||||||
| var newScript = document.createElement('script'); | ||||||||||||||||||||||||||||||||
| newScript.textContent = js; | ||||||||||||||||||||||||||||||||
| document.body.appendChild(newScript); | ||||||||||||||||||||||||||||||||
| }) | ||||||||||||||||||||||||||||||||
| .catch(function(e) { console.error('Failed to load JS:', src, e); }); | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
| // Run immediately | ||||||||||||||||||||||||||||||||
| rewriteLinks(); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Fix relative links for navigation | ||||||||||||||||||||||||||||||||
| document.querySelectorAll('a[href]').forEach(function(link) { | ||||||||||||||||||||||||||||||||
| var href = link.getAttribute('href'); | ||||||||||||||||||||||||||||||||
| // Skip external links and anchors | ||||||||||||||||||||||||||||||||
| if (href.startsWith('http') || href.startsWith('#') || href.startsWith('//')) return; | ||||||||||||||||||||||||||||||||
| // Handle anchor in relative URL (e.g., page-001.html#msg-123) | ||||||||||||||||||||||||||||||||
| var parts = href.split('#'); | ||||||||||||||||||||||||||||||||
| var filename = parts[0]; | ||||||||||||||||||||||||||||||||
| var anchor = parts.length > 1 ? '#' + parts[1] : ''; | ||||||||||||||||||||||||||||||||
| link.setAttribute('href', '?' + gistId + '/' + filename + anchor); | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
| // Also run on DOMContentLoaded in case DOM isn't ready yet | ||||||||||||||||||||||||||||||||
| if (document.readyState === 'loading') { | ||||||||||||||||||||||||||||||||
| document.addEventListener('DOMContentLoaded', function() { rewriteLinks(); }); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Execute module scripts that were injected via innerHTML | ||||||||||||||||||||||||||||||||
| // (browsers don't execute scripts added via innerHTML for security) | ||||||||||||||||||||||||||||||||
| document.querySelectorAll('script[type="module"]').forEach(function(script) { | ||||||||||||||||||||||||||||||||
| if (script.src) return; // Already has src, skip | ||||||||||||||||||||||||||||||||
| var blob = new Blob([script.textContent], { type: 'application/javascript' }); | ||||||||||||||||||||||||||||||||
| var url = URL.createObjectURL(blob); | ||||||||||||||||||||||||||||||||
| var newScript = document.createElement('script'); | ||||||||||||||||||||||||||||||||
| newScript.type = 'module'; | ||||||||||||||||||||||||||||||||
| newScript.src = url; | ||||||||||||||||||||||||||||||||
| document.body.appendChild(newScript); | ||||||||||||||||||||||||||||||||
| // Use MutationObserver to catch dynamically added content | ||||||||||||||||||||||||||||||||
| // gisthost/gistpreview may add content after initial load | ||||||||||||||||||||||||||||||||
| var observer = new MutationObserver(function(mutations) { | ||||||||||||||||||||||||||||||||
| mutations.forEach(function(mutation) { | ||||||||||||||||||||||||||||||||
| mutation.addedNodes.forEach(function(node) { | ||||||||||||||||||||||||||||||||
| if (node.nodeType === 1) { // Element node | ||||||||||||||||||||||||||||||||
| rewriteLinks(node); | ||||||||||||||||||||||||||||||||
| // Also check if the node itself is a link | ||||||||||||||||||||||||||||||||
| if (node.tagName === 'A' && node.getAttribute('href')) { | ||||||||||||||||||||||||||||||||
| var href = node.getAttribute('href'); | ||||||||||||||||||||||||||||||||
| if (!href.startsWith('?') && !href.startsWith('http') && | ||||||||||||||||||||||||||||||||
| !href.startsWith('#') && !href.startsWith('//')) { | ||||||||||||||||||||||||||||||||
| var parts = href.split('#'); | ||||||||||||||||||||||||||||||||
| var filename = parts[0]; | ||||||||||||||||||||||||||||||||
| var anchor = parts.length > 1 ? '#' + parts[1] : ''; | ||||||||||||||||||||||||||||||||
| node.setAttribute('href', '?' + gistId + '/' + filename + anchor); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
Comment on lines
1244
to
1254
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
| }); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Start observing once body exists | ||||||||||||||||||||||||||||||||
| function startObserving() { | ||||||||||||||||||||||||||||||||
| if (document.body) { | ||||||||||||||||||||||||||||||||
| observer.observe(document.body, { childList: true, subtree: true }); | ||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||
| setTimeout(startObserving, 10); | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| startObserving(); | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| // Handle fragment navigation after dynamic content loads | ||||||||||||||||||||||||||||||||
| // gistpreview.github.io loads content dynamically, so the browser's | ||||||||||||||||||||||||||||||||
| // gisthost/gistpreview loads content dynamically, so the browser's | ||||||||||||||||||||||||||||||||
| // native fragment navigation fails because the element doesn't exist yet | ||||||||||||||||||||||||||||||||
| function scrollToFragment() { | ||||||||||||||||||||||||||||||||
| var hash = window.location.hash; | ||||||||||||||||||||||||||||||||
|
|
@@ -1120,11 +1123,12 @@ def render_message(log_type, message_json, timestamp, prompt_num=None): | |||||||||||||||||||||||||||||||
| })(); | ||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # JavaScript to load page content from page-data-NNN.json on gistpreview | ||||||||||||||||||||||||||||||||
| # JavaScript to load page content from page-data-NNN.json on gisthost/gistpreview | ||||||||||||||||||||||||||||||||
| PAGE_DATA_LOADER_JS = r""" | ||||||||||||||||||||||||||||||||
| (function() { | ||||||||||||||||||||||||||||||||
| function getGistDataUrl(pageNum) { | ||||||||||||||||||||||||||||||||
| if (window.location.hostname !== 'gistpreview.github.io') return null; | ||||||||||||||||||||||||||||||||
| var hostname = window.location.hostname; | ||||||||||||||||||||||||||||||||
| if (hostname !== 'gisthost.github.io' && hostname !== 'gistpreview.github.io') return null; | ||||||||||||||||||||||||||||||||
| var query = window.location.search.substring(1); | ||||||||||||||||||||||||||||||||
| var parts = query.split('/'); | ||||||||||||||||||||||||||||||||
| var mainGistId = parts[0]; | ||||||||||||||||||||||||||||||||
|
|
@@ -1151,11 +1155,12 @@ def render_message(log_type, message_json, timestamp, prompt_num=None): | |||||||||||||||||||||||||||||||
| })(); | ||||||||||||||||||||||||||||||||
| """ | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| # JavaScript to load index content from index-data.json on gistpreview | ||||||||||||||||||||||||||||||||
| # JavaScript to load index content from index-data.json on gisthost/gistpreview | ||||||||||||||||||||||||||||||||
| INDEX_DATA_LOADER_JS = r""" | ||||||||||||||||||||||||||||||||
| (function() { | ||||||||||||||||||||||||||||||||
| function getGistDataUrl() { | ||||||||||||||||||||||||||||||||
| if (window.location.hostname !== 'gistpreview.github.io') return null; | ||||||||||||||||||||||||||||||||
| var hostname = window.location.hostname; | ||||||||||||||||||||||||||||||||
| if (hostname !== 'gisthost.github.io' && hostname !== 'gistpreview.github.io') return null; | ||||||||||||||||||||||||||||||||
| var query = window.location.search.substring(1); | ||||||||||||||||||||||||||||||||
| var parts = query.split('/'); | ||||||||||||||||||||||||||||||||
| var mainGistId = parts[0]; | ||||||||||||||||||||||||||||||||
|
|
@@ -1852,7 +1857,7 @@ def cli(): | |||||||||||||||||||||||||||||||
| @click.option( | ||||||||||||||||||||||||||||||||
| "--gist", | ||||||||||||||||||||||||||||||||
| is_flag=True, | ||||||||||||||||||||||||||||||||
| help="Upload to GitHub Gist and output a gistpreview.github.io URL.", | ||||||||||||||||||||||||||||||||
| help="Upload to GitHub Gist and output a gisthost.github.io URL.", | ||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||
| @click.option( | ||||||||||||||||||||||||||||||||
| "--json", | ||||||||||||||||||||||||||||||||
|
|
@@ -1968,7 +1973,7 @@ def local_cmd( | |||||||||||||||||||||||||||||||
| click.echo("Creating GitHub gist...") | ||||||||||||||||||||||||||||||||
| gist_desc = f"claude-code-transcripts local {session_file.stem}" | ||||||||||||||||||||||||||||||||
| gist_id, gist_url = create_gist(output, description=gist_desc) | ||||||||||||||||||||||||||||||||
| preview_url = f"https://gistpreview.github.io/?{gist_id}/index.html" | ||||||||||||||||||||||||||||||||
| preview_url = f"https://gisthost.github.io/?{gist_id}/index.html" | ||||||||||||||||||||||||||||||||
| click.echo(f"Gist: {gist_url}") | ||||||||||||||||||||||||||||||||
| click.echo(f"Preview: {preview_url}") | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
@@ -2037,7 +2042,7 @@ def fetch_url_to_tempfile(url): | |||||||||||||||||||||||||||||||
| @click.option( | ||||||||||||||||||||||||||||||||
| "--gist", | ||||||||||||||||||||||||||||||||
| is_flag=True, | ||||||||||||||||||||||||||||||||
| help="Upload to GitHub Gist and output a gistpreview.github.io URL.", | ||||||||||||||||||||||||||||||||
| help="Upload to GitHub Gist and output a gisthost.github.io URL.", | ||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||
| @click.option( | ||||||||||||||||||||||||||||||||
| "--json", | ||||||||||||||||||||||||||||||||
|
|
@@ -2142,7 +2147,7 @@ def json_cmd( | |||||||||||||||||||||||||||||||
| input_name = Path(original_input).stem | ||||||||||||||||||||||||||||||||
| gist_desc = f"claude-code-transcripts json {input_name}" | ||||||||||||||||||||||||||||||||
| gist_id, gist_url = create_gist(output, description=gist_desc) | ||||||||||||||||||||||||||||||||
| preview_url = f"https://gistpreview.github.io/?{gist_id}/index.html" | ||||||||||||||||||||||||||||||||
| preview_url = f"https://gisthost.github.io/?{gist_id}/index.html" | ||||||||||||||||||||||||||||||||
| click.echo(f"Gist: {gist_url}") | ||||||||||||||||||||||||||||||||
| click.echo(f"Preview: {preview_url}") | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
@@ -2526,7 +2531,7 @@ def code_view_progress(phase, current, total): | |||||||||||||||||||||||||||||||
| @click.option( | ||||||||||||||||||||||||||||||||
| "--gist", | ||||||||||||||||||||||||||||||||
| is_flag=True, | ||||||||||||||||||||||||||||||||
| help="Upload to GitHub Gist and output a gistpreview.github.io URL.", | ||||||||||||||||||||||||||||||||
| help="Upload to GitHub Gist and output a gisthost.github.io URL.", | ||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||
| @click.option( | ||||||||||||||||||||||||||||||||
| "--json", | ||||||||||||||||||||||||||||||||
|
|
@@ -2653,7 +2658,7 @@ def web_cmd( | |||||||||||||||||||||||||||||||
| click.echo("Creating GitHub gist...") | ||||||||||||||||||||||||||||||||
| gist_desc = f"claude-code-transcripts web {session_id}" | ||||||||||||||||||||||||||||||||
| gist_id, gist_url = create_gist(output, description=gist_desc) | ||||||||||||||||||||||||||||||||
| preview_url = f"https://gistpreview.github.io/?{gist_id}/index.html" | ||||||||||||||||||||||||||||||||
| preview_url = f"https://gisthost.github.io/?{gist_id}/index.html" | ||||||||||||||||||||||||||||||||
| click.echo(f"Gist: {gist_url}") | ||||||||||||||||||||||||||||||||
| click.echo(f"Preview: {preview_url}") | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract this
function(link) {block into a newfunction rewriteLink(root) {so it can reused later at line 1074
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or test right here if the root is also an
a[href]then the block below at 1074 is not needed: