GeezerVison is showing github.com — refactor(core)!: call the session tools opencode.session.rename and .move in Code Mode by rekram1-node · Pull Request #65080 · anomalyco/opencode
refactor(core)!: call the session tools opencode.session.rename and .move in Code Mode
#65080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
? "When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider using `execute` to call `tools.opencode.session_move` and make the worktree the session's working directory."
? "When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider using `execute` to call `tools.opencode.session.move` and make the worktree the session's working directory."
: "opencode_session_move" in event.tools
? "When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider calling `opencode_session_move` to make the worktree the session's working directory."
: undefined
Expand All
@@ -120,12 +120,12 @@ export const Plugin = {
"Tools for managing OpenCode itself, such as working with sessions and worktrees, searching the available models, and reading MCP resources.",
})
draft.add({
name: "session_rename",
name: "rename",
description:
"Rename a session, or omit sessionID to rename the current session. Use a short, specific title that summarizes the work being done.",
"Move a session to another directory, or omit sessionID to move the current session. The current session moves at the next safe boundary; do not run destination-dependent tools in the same execute call.",
"When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider using `execute` to call `tools.opencode.session_move` and make the worktree the session's working directory.",
"When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider using `execute` to call `tools.opencode.session.move` and make the worktree the session's working directory.",
"When you create a worktree outside the current working directory and intend to use it as your primary working directory, consider calling `opencode_session_move` to make the worktree the session's working directory.",
@@ -246,11 +246,12 @@ tools enforce the permissions they assert.
### Sessions
The `opencode` Code Mode namespace contains session utilities:
The `opencode.session` Code Mode namespace contains session utilities. Without Code
Mode they are listed as `opencode_session_rename` and `opencode_session_move`.
- `session_rename` changes the title of the current session, or another session
- `rename` changes the title of the current session, or another session
selected by `sessionID`.
- `session_move` moves the current session, or another selected session, to a
- `move` moves the current session, or another selected session, to a
relative or absolute `directory`. The move takes effect at a safe boundary,
so destination-dependent work belongs in a later call.
Expand All
@@ -260,7 +261,7 @@ Rename this session to "Timeout cleanup", then move it to the new worktree.
### Worktrees
The same namespace manages worktrees for the session's project:
The `opencode` namespace manages worktrees for the session's project:
- `worktree_create` creates a worktree from a `name` and returns its
`directory`. The project's worktree configuration selects the destination and
Expand Down
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.