@@ -412,7 +412,7 @@ describe('claude utils', () => {
412412 } )
413413
414414 describe ( 'launchClaudeInNewTerminalWindow' , ( ) => {
415- it ( 'should open new terminal window with Claude command' , async ( ) => {
415+ it ( 'should open new terminal window with hb ignite command' , async ( ) => {
416416 const prompt = 'Work on this issue'
417417 const workspacePath = '/path/to/workspace'
418418
@@ -423,7 +423,9 @@ describe('claude utils', () => {
423423
424424 await launchClaudeInNewTerminalWindow ( prompt , { workspacePath } )
425425
426- // Verify osascript was called for terminal window
426+ // Verify osascript was called for terminal window with hb ignite command
427+ const applescript = vi . mocked ( execa ) . mock . calls [ 0 ] [ 1 ] ?. [ 1 ] as string
428+ expect ( applescript ) . toContain ( 'hb ignite' )
427429 expect ( execa ) . toHaveBeenCalledWith (
428430 'osascript' ,
429431 [ '-e' , expect . stringContaining ( 'tell application "Terminal"' ) ]
@@ -450,7 +452,9 @@ describe('claude utils', () => {
450452
451453 await launchClaudeInNewTerminalWindow ( prompt , { workspacePath, branchName } )
452454
453- // Verify terminal window was opened
455+ // Verify terminal window was opened with hb ignite
456+ const applescript = vi . mocked ( execa ) . mock . calls [ 0 ] [ 1 ] ?. [ 1 ] as string
457+ expect ( applescript ) . toContain ( 'hb ignite' )
454458 expect ( execa ) . toHaveBeenCalledWith (
455459 'osascript' ,
456460 [ '-e' , expect . stringContaining ( 'tell application "Terminal"' ) ]
@@ -470,9 +474,10 @@ describe('claude utils', () => {
470474
471475 await launchClaudeInNewTerminalWindow ( prompt , { workspacePath } )
472476
473- // Verify .env sourcing is included
477+ // Verify .env sourcing is included and hb ignite is used
474478 const applescript = vi . mocked ( execa ) . mock . calls [ 0 ] [ 1 ] ?. [ 1 ] as string
475479 expect ( applescript ) . toContain ( 'source .env' )
480+ expect ( applescript ) . toContain ( 'hb ignite' )
476481 expect ( existsSync ) . toHaveBeenCalledWith ( '/path/to/workspace/.env' )
477482 } )
478483
@@ -489,12 +494,13 @@ describe('claude utils', () => {
489494
490495 await launchClaudeInNewTerminalWindow ( prompt , { workspacePath } )
491496
492- // Verify .env sourcing is NOT included
497+ // Verify .env sourcing is NOT included but hb ignite is used
493498 const applescript = vi . mocked ( execa ) . mock . calls [ 0 ] [ 1 ] ?. [ 1 ] as string
494499 expect ( applescript ) . not . toContain ( 'source .env' )
500+ expect ( applescript ) . toContain ( 'hb ignite' )
495501 } )
496502
497- it ( 'should properly escape prompt for AppleScript ' , async ( ) => {
503+ it ( 'should not build complex claude command with prompt ' , async ( ) => {
498504 const prompt = "Fix the user's \"authentication\" issue"
499505 const workspacePath = '/path/to/workspace'
500506
@@ -505,14 +511,14 @@ describe('claude utils', () => {
505511
506512 await launchClaudeInNewTerminalWindow ( prompt , { workspacePath } )
507513
508- // Verify command was constructed
509- expect ( execa ) . toHaveBeenCalledWith (
510- 'osascript' ,
511- [ '-e' , expect . stringContaining ( 'tell application "Terminal"' ) ]
512- )
514+ // Verify simple hb ignite command is used, not complex claude command with prompt
515+ const applescript = vi . mocked ( execa ) . mock . calls [ 0 ] [ 1 ] ?. [ 1 ] as string
516+ expect ( applescript ) . toContain ( 'hb ignite' )
517+ expect ( applescript ) . not . toContain ( '--append-system-prompt' )
518+ expect ( applescript ) . not . toContain ( prompt )
513519 } )
514520
515- it ( 'should use --append-system-prompt flag for terminal window mode ' , async ( ) => {
521+ it ( 'should use hb ignite instead of building claude command with args ' , async ( ) => {
516522 const prompt = 'Work on this issue'
517523 const workspacePath = '/path/to/workspace'
518524
@@ -523,9 +529,12 @@ describe('claude utils', () => {
523529
524530 await launchClaudeInNewTerminalWindow ( prompt , { workspacePath } )
525531
526- // Verify --append-system-prompt is used in the command
532+ // Verify hb ignite is used, not claude with model/permission args
527533 const applescript = vi . mocked ( execa ) . mock . calls [ 0 ] [ 1 ] ?. [ 1 ] as string
528- expect ( applescript ) . toContain ( '--append-system-prompt' )
534+ expect ( applescript ) . toContain ( 'hb ignite' )
535+ expect ( applescript ) . not . toContain ( '--model' )
536+ expect ( applescript ) . not . toContain ( '--permission-mode' )
537+ expect ( applescript ) . not . toContain ( '--add-dir' )
529538 } )
530539 } )
531540
0 commit comments