Skip to content

Commit f5a855a

Browse files
metiu1claude
andcommitted
v0.3.61: "a" (auto) stops re-prompting; strip control chars from tool output
- After choosing "a" in a terminal approval, the gate kept calling approve with its build-time mode, so it asked again every step. approve now short-circuits to yes once the session is auto/autonomous. - truncStr strips \r and other control chars from printed tool args/results, so carriage returns can no longer overwrite previous lines (garbled rendering). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 169deab commit f5a855a

6 files changed

Lines changed: 21 additions & 5 deletions

File tree

vortelio-pip/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "vortelio"
7-
version = "0.3.60"
7+
version = "0.3.61"
88
description = "Local-first AI platform. Run LLMs, generate images & video, transcribe audio, create 3D — on your own machine. OpenAI & Ollama API compatible. Apache 2.0."
99
readme = "README.md"
1010
requires-python = ">=3.8"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.3.60"
1+
__version__ = "0.3.61"

vortelio-pip/src/vortelio_cli/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import urllib.request
1111
from pathlib import Path
1212

13-
VERSION = "0.3.60"
13+
VERSION = "0.3.61"
1414
RELEASE_BASE = os.environ.get(
1515
"VORTELIO_RELEASE_BASE",
1616
f"https://github.com/metiu1/Vortelio/releases/download/v{VERSION}",
512 Bytes
Binary file not shown.

vortelio/internal/cli/commands/code.go

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,12 @@ func (s *codeSession) emit(ev string, data interface{}) {
161161

162162
// approve is the synchronous terminal approval for "ask" mode.
163163
func (s *codeSession) approve(tool, summary, args string) bool {
164+
// Once the user picked "a" (auto) — or the session is autonomous — stop
165+
// prompting: the gate keeps calling approve with its build-time mode, so this
166+
// is what actually silences further confirmations for the rest of the session.
167+
if s.mode == "auto" || s.autonomous {
168+
return true
169+
}
164170
fmt.Printf("\n %s⚠ Conferma azione%s %s%s%s\n", cYell, cReset, cBold, summary, cReset)
165171
fmt.Printf(" %s%s%s\n", cDim, truncStr(args, 200), cReset)
166172
fmt.Printf(" [%sy%s] sì [%sn%s] no [%sa%s] sì a tutto (auto) ", cGreen, cReset, cRed, cReset, cCyan, cReset)
@@ -456,7 +462,17 @@ func pickDefaultLLM(store *hub.ModelStore) *hub.Model {
456462
}
457463

458464
func truncStr(s string, max int) string {
459-
s = strings.ReplaceAll(s, "\n", " ")
465+
// Strip control chars (esp. \r) so printed tool output can't move the cursor
466+
// to column 0 and overwrite previous lines (garbled terminal rendering).
467+
s = strings.Map(func(r rune) rune {
468+
if r == '\n' || r == '\r' || r == '\t' {
469+
return ' '
470+
}
471+
if r < 0x20 || r == 0x7f {
472+
return -1
473+
}
474+
return r
475+
}, s)
460476
if len(s) > max { return s[:max] + "…" }
461477
return s
462478
}

vortelio/internal/version/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ package version
33
// Version è impostabile a build time via:
44
//
55
// -ldflags "-X github.com/vortelio/vortelio/internal/version.Version=X.Y.Z"
6-
var Version = "0.3.60"
6+
var Version = "0.3.61"

0 commit comments

Comments
 (0)