adjust agentapi terminal width and height

This commit is contained in:
Hugo Dutka 2025-06-04 14:32:27 +02:00
parent bd05d06a3b
commit d2b91ae1a8

View File

@ -171,7 +171,9 @@ resource "coder_script" "claude_code" {
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server -- bash -c "claude --dangerously-skip-permissions \"$CODER_MCP_CLAUDE_TASK_PROMPT\" | tee -a \"$HOME/.claude-code.log\""; exec bash'
# use low width to fit in the tasks UI sidebar. height is adjusted to ~match the default 80k (80x1000) characters
# visible in the terminal screen.
tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server --term-width 56 --term-height 1425 -- bash -c "claude --dangerously-skip-permissions \"$CODER_MCP_CLAUDE_TASK_PROMPT\" | tee -a \"$HOME/.claude-code.log\""; exec bash'
echo "Waiting for agentapi server to start on port 3284..."
for i in $(seq 1 15); do
if lsof -i :3284 | grep -q 'LISTEN'; then
@ -260,7 +262,9 @@ resource "coder_app" "claude_code" {
if ! tmux has-session -t claude-code-agentapi 2>/dev/null; then
echo "Starting a new Claude Code agentapi tmux session." | tee -a "$HOME/.claude-code.log"
tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server -- bash -c "claude --dangerously-skip-permissions | tee -a \"$HOME/.claude-code.log\""; exec bash'
# use low width to fit in the tasks UI sidebar. height is adjusted to ~match the default 80k (80x1000) characters
# visible in the terminal screen.
tmux new-session -d -s claude-code-agentapi -c ${var.folder} 'agentapi server --term-width 56 --term-height 1425 -- bash -c "claude --dangerously-skip-permissions | tee -a \"$HOME/.claude-code.log\""; exec bash'
fi
if tmux has-session -t claude-code 2>/dev/null; then