Skip to content

armgit / ax

Public Imported from GitHub
0

Agent Executor (AX) is Google's open agentic orchestration runtime

Go

Remove loading animation (#43)

Jaana Doganc0bfda963c91
diff --git a/cmd/gar/internal/display.go b/cmd/gar/internal/display.go
index 0e51511..1f2f43f 100644
--- a/cmd/gar/internal/display.go
+++ b/cmd/gar/internal/display.go
@@ -19,7 +19,6 @@ import (
"sync/atomic"
"github.com/charmbracelet/huh"
- "github.com/charmbracelet/huh/spinner"
"github.com/charmbracelet/lipgloss"
)
@@ -56,27 +55,6 @@ func NewDisplay(sessionID string) *Display {
}
}
-func (d *Display) hideLoading() {
- if d.loadingVisible.Load() {
- d.loadingStopCh <- true
- d.loadingVisible.Store(false)
- }
-}
-
-func (d *Display) showLoading() {
- d.loadingVisible.Store(true)
-
- done := func() {
- <-d.loadingStopCh
- }
- go func() {
- spinner.New().
- Title("Loading...").
- Action(done).
- Run()
- }()
-}
-
// DisplayInput displays the user input.
func (d *Display) DisplayInput(text string) {
fmt.Printf("%s %s\n",
@@ -84,14 +62,10 @@ func (d *Display) DisplayInput(text string) {
text,
)
fmt.Println()
-
- d.showLoading()
}
// DisplayOutput displays an output fragment.
func (d *Display) DisplayOutput(text string) {
- d.hideLoading()
-
fmt.Print(text)
}
@@ -114,8 +88,6 @@ func (d *Display) DisplayHeader() {
// PromptForApproval shows an accept/reject dialog
// Returns true if accepted, false if rejected, and an error if cancelled (Ctrl+C)
func (d *Display) PromptForApproval(question string) (bool, error) {
- d.hideLoading()
-
var accepted bool
form := huh.NewForm(
huh.NewGroup(
@@ -136,8 +108,6 @@ func (d *Display) PromptForApproval(question string) (bool, error) {
// PromptForInput shows the input box and returns the user input
// Returns the input string and an error if the user cancelled (Ctrl+C)
func (d *Display) PromptForInput() (string, error) {
- d.hideLoading()
-
var userInput string
form := huh.NewForm(
huh.NewGroup(
diff --git a/cmd/gar/trigger.go b/cmd/gar/trigger.go
index b1d3a0c..ee031bd 100644
--- a/cmd/gar/trigger.go
+++ b/cmd/gar/trigger.go
@@ -145,10 +145,11 @@ func runTriggerHeadless(ctx context.Context, d *internal.Display, sessionID stri
var checkpoint string
outputHandler := agent.OutputHandler(func(resp *proto.ProcessResponse) error {
- displayContents(d, resp.Contents)
if resp.CheckpointId != "" {
checkpoint = resp.CheckpointId
}
+
+ displayContents(d, resp.Contents)
return nil
})
if err := triggerController.TriggerSession(ctx, sessionID, &proto.ProcessRequest{
diff --git a/internal/controller/gemini.go b/internal/controller/gemini.go
index 1c3943c..a002014 100644
--- a/internal/controller/gemini.go
+++ b/internal/controller/gemini.go
@@ -166,7 +166,6 @@ func (p *geminiPlannerAgent) Process(ctx context.Context, sessionID string, inco
}
if part.Text != "" {
- // Text response
if err := handler(&proto.ProcessResponse{
Contents: []*proto.Content{{
Content: &proto.Content_Text{