c9355e526b
* fix: strip origin/ prefix from base branch for rebase/merge operations The frontend was passing 'origin/main' as the base branch, but the backend expects just the branch name (e.g., 'main') and constructs 'origin/' itself. This caused git fetch to fail with: fatal: couldn't find remote ref origin/main Because the command became 'git fetch origin origin/main' instead of 'git fetch origin main'. * fix: increase prompt timeout to 60min, add error feedback, rename acp to agent API - Add PromptTimeout constant (60 minutes) in common/constants/timeouts.go - Update agentctl client and server to use the constant - Add error message creation when prompt fails (timeout, agent not running, etc) - Rename /acp/* endpoints to /agent/* (protocol-agnostic naming) - Rename acp.go files to agent.go in both client and server - Rename handler functions from handleACP* to handleAgent*
27 lines
964 B
Go
27 lines
964 B
Go
// Package constants provides application-wide constants and timeouts.
|
|
package constants
|
|
|
|
import "time"
|
|
|
|
// Timeouts for various operations.
|
|
const (
|
|
// AgentLaunchTimeout is the maximum time to wait for agent launch,
|
|
// including worktree creation and setup script execution.
|
|
AgentLaunchTimeout = 6 * time.Minute
|
|
|
|
// SetupScriptTimeout is the maximum time to wait for a setup script to complete.
|
|
SetupScriptTimeout = 5 * time.Minute
|
|
|
|
// CleanupScriptTimeout is the maximum time to wait for a cleanup script to complete.
|
|
CleanupScriptTimeout = 5 * time.Minute
|
|
|
|
// TaskDeleteTimeout is the maximum time to wait for task deletion,
|
|
// including cleanup scripts and worktree removal.
|
|
TaskDeleteTimeout = 2 * time.Minute
|
|
|
|
// PromptTimeout is the maximum time to wait for an agent to complete a prompt.
|
|
// Agent tasks can take a long time (complex code generation, large refactors),
|
|
// so this is set to a generous value.
|
|
PromptTimeout = 60 * time.Minute
|
|
)
|