Skip to content

Couple LongRunningCommandAgentInteractionState with block id#27

Merged
seemeroland merged 2 commits into
mainfrom
roland/lrc-update-should-apply-to-specific-block
Jun 9, 2026
Merged

Couple LongRunningCommandAgentInteractionState with block id#27
seemeroland merged 2 commits into
mainfrom
roland/lrc-update-should-apply-to-specific-block

Conversation

@seemeroland

@seemeroland seemeroland commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Comment thread src/common/ui_state.rs

/// How the agent is interacting with the current long running command (if at all).
/// Deprecated in favor of long_running_command_agent_interaction.
pub long_running_command_agent_interaction_state:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

should also skip serializing if this is None, no?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yea might as well add it now. Technically just need #[serde(default)] once the field is no longer populated

Comment thread src/common/ui_state.rs

/// How the agent is interacting with a specific long running command block.
#[derive(Clone, Debug, Deserialize, Serialize, PartialEq, Eq)]
pub struct LongRunningCommandAgentInteraction {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Rather than adding a separate type and having to deal with migrating from one LRC type to another, I actually think it could be ok to just add active_block_id as a sibling field? Is that enough to determine if the update should be applied (wouldn't block_id as populated by the sharer always be the active block ID)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

then you don't have to deal with a semantic either/or migration for the new field and old field, can just say there is a new field only supported by newer clients?

@seemeroland seemeroland Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The complication with that is that UniversalDeveloperInputContext is a merging of several sources of writes to a shared cache. If we put active block id on this, it would either need to be populated on every source (and probably all of these updates should be guarded on matching block id), or we say it's specifically for the LRC update which is weirder imo.

I think coupling to LRC update is what I want. For this update we need the block id to come from the source of updating LRC state, not the active block id at time of sending UniversalDeveloperInputContext

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

i see

@seemeroland seemeroland merged commit b30fdd0 into main Jun 9, 2026
5 checks passed
@seemeroland seemeroland deleted the roland/lrc-update-should-apply-to-specific-block branch June 9, 2026 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants