fix: skip executor preparer for repo-less tasks like config chat (#432)
fix: skip environment preparer for repo-less tasks like config chat Config chat sessions created without repository associations would crash with "no repository path provided" when the workspace default executor had a registered preparer (e.g. worktree). The preparer was selected based on executor type but had no repository to work with. Skip any environment preparer when RepositoryPath is empty — the session falls through to the quick-chat workspace path instead.
This commit is contained in:
@@ -294,6 +294,17 @@ func (m *Manager) runEnvironmentPreparer(
|
||||
return nil
|
||||
}
|
||||
|
||||
// Skip environment preparation for repo-less tasks (e.g. config chat).
|
||||
// Preparers assume a repository is available; without one the session
|
||||
// falls through to the quick-chat workspace path instead.
|
||||
if req.RepositoryPath == "" {
|
||||
m.logger.Debug("skipping environment preparer — no repository path",
|
||||
zap.String("task_id", req.TaskID),
|
||||
zap.String("session_id", req.SessionID),
|
||||
zap.String("preparer", preparer.Name()))
|
||||
return nil
|
||||
}
|
||||
|
||||
prepReq := &EnvPrepareRequest{
|
||||
TaskID: req.TaskID,
|
||||
SessionID: req.SessionID,
|
||||
|
||||
Reference in New Issue
Block a user