feat(opencode): add session loop command (updated)#37504
Open
mgajda wants to merge 2 commits into
Open
Conversation
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Found Related PRPR #23575: feat(opencode): add session loop command This is the original PR that the current PR #37504 is based on. The current PR is an updated rebase of #23575 with resolved merge conflicts and modernized types (ProviderV2.ID, SessionV1.User, EventV2Bridge, etc.). The PR description explicitly states: "The original PR #23575 went stale and had merge conflicts with dev. This is an updated version rebased on current dev..." Note: PR #23575 should likely be closed in favor of this updated version (PR #37504) to avoid confusion and conflicting changes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #23578
Type of change
What does this PR do?
This adds a built-in
/loopcommand and/proactivealias. The original PR #23575 went stale and had merge conflicts with dev. This is an updated version rebased on current dev, with types adapted to the current API (ProviderV2.ID, SessionV1.User, EventV2Bridge, etc.) and the loop execution rewritten to useEffect.forkIn(scope)instead ofsetTimeout+Effect.runPromiseExit.The command runs an immediate loop step, then continues either on a timer (
/loop 5m ...) or in self-paced mode when the assistant ends with a continue marker. Also supports/loop stop, uses.claude/loop.mdwhen no prompt is provided, and removes loop control markers from assistant text before it is shown in the session.How did you verify your code works?
tsgo --noEmitpassesit.instancepatternScreenshots / recordings
N/A.
Checklist