This repository was archived by the owner on Aug 6, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 blue ,
1010 cyan ,
1111 dim ,
12+ formatChangeId ,
13+ formatCommitId ,
1214 green ,
1315 hint ,
1416 magenta ,
@@ -432,8 +434,10 @@ function renderEnhancedOutput(
432434 }
433435 pendingHints = [ ] ;
434436 }
435- // Add blank line after commit
436- output . push ( "│" ) ;
437+ // Add blank line after commit, preserving graph structure
438+ // Extract just the graph connectors from prefix (│, ├, etc.)
439+ const blankLinePrefix = prefix . replace ( / [ ^ \s │ ├ ─ ╯ ╮ ╭ ] / g, " " ) . trimEnd ( ) ;
440+ output . push ( blankLinePrefix || "│" ) ;
437441 break ;
438442 }
439443 }
@@ -545,22 +549,6 @@ function buildPRInfoMap(
545549 return prInfoMap ;
546550}
547551
548- function formatChangeId ( changeId : string , prefix : string ) : string {
549- const short = changeId . slice ( 0 , 8 ) ;
550- if ( prefix && short . startsWith ( prefix ) ) {
551- return magenta ( prefix ) + dim ( short . slice ( prefix . length ) ) ;
552- }
553- return magenta ( short ) ;
554- }
555-
556- function formatCommitId ( commitId : string , prefix : string ) : string {
557- const short = commitId . slice ( 0 , 8 ) ;
558- if ( prefix && short . startsWith ( prefix ) ) {
559- return cyan ( prefix ) + dim ( short . slice ( prefix . length ) ) ;
560- }
561- return cyan ( short ) ;
562- }
563-
564552function formatPRLine ( prInfo : PRInfo ) : string {
565553 const stateColor =
566554 prInfo . state === "MERGED" ? magenta : prInfo . state === "OPEN" ? green : red ;
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ const colors = {
1414 white : "\x1b[37m" ,
1515 pink : "\x1b[1;95m" ,
1616 brightBlue : "\x1b[1;94m" ,
17+ // jj-style 256 colors
18+ jjChangeId : "\x1b[38;5;5m" , // magenta (256-color)
19+ jjChangeIdBright : "\x1b[1m\x1b[38;5;13m" , // bright magenta (for WC)
20+ jjCommitId : "\x1b[38;5;4m" , // blue (256-color)
21+ jjCommitIdBright : "\x1b[1m\x1b[38;5;12m" , // bright blue (for WC)
22+ jjGray : "\x1b[38;5;8m" , // gray for suffixes
1723} ;
1824
1925export function red ( text : string ) : string {
@@ -58,12 +64,12 @@ export function dim(text: string): string {
5864
5965export function formatChangeId ( fullId : string , prefix : string ) : string {
6066 const rest = fullId . slice ( prefix . length ) ;
61- return `${ pink ( prefix ) } ${ dim ( rest ) } ` ;
67+ return `${ colors . jjChangeId } ${ prefix } ${ colors . jjGray } ${ rest } ${ colors . reset } ` ;
6268}
6369
6470export function formatCommitId ( fullId : string , prefix : string ) : string {
6571 const rest = fullId . slice ( prefix . length ) ;
66- return `${ colors . brightBlue } ${ prefix } ${ colors . reset } ${ dim ( rest ) } ` ;
72+ return `${ colors . brightBlue } ${ prefix } ${ colors . reset } ${ colors . jjGray } ${ rest } ${ colors . reset } ` ;
6773}
6874
6975export function formatError ( error : unknown ) : string {
You can’t perform that action at this time.
0 commit comments