Serve the Pipelines chat tools over a loopback MCP endpoint and register it with Claude Code, Codex and OpenCode chats
This commit is contained in:
@@ -95,8 +95,11 @@ func (s *session) cliArgs(resume bool) ([]string, string) {
|
||||
args = append(args, "--session-id", s.id)
|
||||
}
|
||||
s.mu.Lock()
|
||||
model, mode, title := s.model, s.mode, s.title
|
||||
model, mode, title, toolsOff := s.model, s.mode, s.title, s.toolsOff
|
||||
s.mu.Unlock()
|
||||
if !toolsOff {
|
||||
args = append(args, pipelinesToolArgs(s.id)...)
|
||||
}
|
||||
if model != "" {
|
||||
args = append(args, "--model", model)
|
||||
}
|
||||
@@ -130,6 +133,18 @@ func (s *session) spawn(ctx context.Context) (*process, error) {
|
||||
if p := s.existingHost(); p != nil {
|
||||
return p, nil
|
||||
}
|
||||
p, err := s.spawnOnce(ctx)
|
||||
if err == nil || ctx.Err() != nil || !s.disableTools(err) {
|
||||
return p, err
|
||||
}
|
||||
if p := s.existingHost(); p != nil {
|
||||
return p, nil
|
||||
}
|
||||
return s.spawnOnce(ctx)
|
||||
}
|
||||
|
||||
// spawnOnce starts and initializes one CLI process with the current arguments.
|
||||
func (s *session) spawnOnce(ctx context.Context) (*process, error) {
|
||||
args, mode := s.cliArgs(findTranscriptFile(s.id) != "")
|
||||
env, notices := s.chat.processEnv(ctx, s.directory)
|
||||
s.mu.Lock()
|
||||
|
||||
Reference in New Issue
Block a user