Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: load usage from conversions when used with cli commands#1575

Merged
tusharmath merged 18 commits into
mainfrom
ext/load-usage-from-conversions-when-used-with-cli-commands
Sep 23, 2025
Merged

fix: load usage from conversions when used with cli commands#1575
tusharmath merged 18 commits into
mainfrom
ext/load-usage-from-conversions-when-used-with-cli-commands

Conversation

@laststylebender14

@laststylebender14 laststylebender14 commented Sep 17, 2025

Copy link
Copy Markdown
Contributor

Fixes

  1. Usage isn’t loaded from conversation with the following CLI commands:
    • --resume
    • --conversation

Comment thread crates/forge_main/src/ui.rs
@laststylebender14 laststylebender14 marked this pull request as ready for review September 17, 2025 12:40
.context
.and_then(|ctx| ctx.usage)
.unwrap_or(self.state.usage.clone());
self.spinner.stop(None)?;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The spinner.stop() call is placed inside the init_conversation method but only in the None branch (when creating a new conversation). However, the spinner.start() is called at the beginning of this branch. If the conversation_id already exists (Some branch), the spinner is never started, so this placement is correct. But if there's an error between spinner.start() and this spinner.stop(), the spinner will remain running. The spinner.stop() should be moved outside the conversation creation logic or wrapped in proper error handling to ensure it's always called after spinner.start().

Suggested change
self.spinner.stop(None)?;
let _spinner_guard = self.spinner.guard();

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Base automatically changed from fix/set-the-usage-from-conversation to main September 17, 2025 13:24
@laststylebender14 laststylebender14 changed the title ext: load usage from conversions when used with cli commands fix: load usage from conversions when used with cli commands Sep 22, 2025
@github-actions github-actions Bot added the type: fix Iterations on existing features or infrastructure. label Sep 23, 2025
@tusharmath tusharmath merged commit 817e15f into main Sep 23, 2025
9 checks passed
@tusharmath tusharmath deleted the ext/load-usage-from-conversions-when-used-with-cli-commands branch September 23, 2025 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Iterations on existing features or infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants