@@ -29,6 +29,7 @@ import { Provider } from "../../provider/provider"
2929import { Bus } from "../../bus"
3030import { MessageV2 } from "../../session/message-v2"
3131import { SessionPrompt } from "@/session/prompt"
32+ import { AppRuntime } from "@/effect/app-runtime"
3233import { Git } from "@/git"
3334import { setTimeout as sleep } from "node:timers/promises"
3435import { Process } from "@/util/process"
@@ -258,7 +259,9 @@ export const GithubInstallCommand = cmd({
258259 }
259260
260261 // Get repo info
261- const info = ( await Git . run ( [ "remote" , "get-url" , "origin" ] , { cwd : Instance . worktree } ) ) . text ( ) . trim ( )
262+ const info = await AppRuntime . runPromise (
263+ Git . Service . use ( ( git ) => git . run ( [ "remote" , "get-url" , "origin" ] , { cwd : Instance . worktree } ) ) ,
264+ ) . then ( ( x ) => x . text ( ) . trim ( ) )
262265 const parsed = parseGitHubRemote ( info )
263266 if ( ! parsed ) {
264267 prompts . log . error ( `Could not find git repository. Please run this command from a git repository.` )
@@ -497,20 +500,21 @@ export const GithubRunCommand = cmd({
497500 : "issue"
498501 : undefined
499502 const gitText = async ( args : string [ ] ) => {
500- const result = await Git . run ( args , { cwd : Instance . worktree } )
503+ const result = await AppRuntime . runPromise ( Git . Service . use ( ( git ) => git . run ( args , { cwd : Instance . worktree } ) ) )
501504 if ( result . exitCode !== 0 ) {
502505 throw new Process . RunFailedError ( [ "git" , ...args ] , result . exitCode , result . stdout , result . stderr )
503506 }
504507 return result . text ( ) . trim ( )
505508 }
506509 const gitRun = async ( args : string [ ] ) => {
507- const result = await Git . run ( args , { cwd : Instance . worktree } )
510+ const result = await AppRuntime . runPromise ( Git . Service . use ( ( git ) => git . run ( args , { cwd : Instance . worktree } ) ) )
508511 if ( result . exitCode !== 0 ) {
509512 throw new Process . RunFailedError ( [ "git" , ...args ] , result . exitCode , result . stdout , result . stderr )
510513 }
511514 return result
512515 }
513- const gitStatus = ( args : string [ ] ) => Git . run ( args , { cwd : Instance . worktree } )
516+ const gitStatus = ( args : string [ ] ) =>
517+ AppRuntime . runPromise ( Git . Service . use ( ( git ) => git . run ( args , { cwd : Instance . worktree } ) ) )
514518 const commitChanges = async ( summary : string , actor ?: string ) => {
515519 const args = [ "commit" , "-m" , summary ]
516520 if ( actor ) args . push ( "-m" , `Co-authored-by: ${ actor } <${ actor } @users.noreply.github.com>` )
0 commit comments