mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-28 05:46:58 +02:00
Merge remote-tracking branch 'origin/main' into feat/chat-ui-improvements
This commit is contained in:
@@ -64,18 +64,13 @@ func (b *claudeBackend) Execute(ctx context.Context, prompt string, opts ExecOpt
|
||||
_ = cmd.Wait()
|
||||
return nil, fmt.Errorf("write claude input: %w", err)
|
||||
}
|
||||
if err := stdin.Close(); err != nil {
|
||||
cancel()
|
||||
_ = cmd.Wait()
|
||||
return nil, fmt.Errorf("close claude stdin: %w", err)
|
||||
}
|
||||
|
||||
b.cfg.Logger.Info("claude started", "pid", cmd.Process.Pid, "cwd", opts.Cwd, "model", opts.Model)
|
||||
|
||||
msgCh := make(chan Message, 256)
|
||||
resCh := make(chan Result, 1)
|
||||
|
||||
go func() {
|
||||
defer stdin.Close()
|
||||
defer cancel()
|
||||
defer close(msgCh)
|
||||
defer close(resCh)
|
||||
@@ -129,6 +124,10 @@ func (b *claudeBackend) Execute(ctx context.Context, prompt string, opts ExecOpt
|
||||
Content: msg.Log.Message,
|
||||
})
|
||||
}
|
||||
case "control_request":
|
||||
// Auto-approve tool-use permission requests so that Claude
|
||||
// can proceed in daemon / bypass-permissions mode.
|
||||
b.handleControlRequest(msg, stdin)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user