opencode-handoff 0.3.2 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,22 +13,29 @@ Inspired by Amp's handoff command - see their [post](https://ampcode.com/news/ha
13
13
 
14
14
  ## Requirements
15
15
 
16
- - [OpenCode](https://opencode.ai/) v1.0.143 or later
16
+ - [OpenCode](https://opencode.ai/) v1.0.188 or later
17
17
 
18
18
  ## Installation
19
19
 
20
- Add to your OpenCode config (`~/.config/opencode/config.json`):
20
+ Add to your OpenCode config (`~/.config/opencode/opencode.json`):
21
21
 
22
22
  ```json
23
23
  {
24
- "plugin": ["opencode-handoff@0.3.2"]
24
+ "plugin": ["opencode-handoff"]
25
25
  }
26
26
  ```
27
27
 
28
28
  Restart OpenCode and you're ready to go.
29
29
 
30
- Pin to a specific version to ensure updates work correctly - OpenCode's lockfile won't re-resolve unpinned versions. To upgrade, change the version and restart.
30
+ Optionally, pin to a specific version for stability:
31
31
 
32
+ ```json
33
+ {
34
+ "plugin": ["opencode-handoff@0.4.0"]
35
+ }
36
+ ```
37
+
38
+ OpenCode fetches unpinned plugins from npm on each startup; pinned versions are cached and require a manual version bump to update.
32
39
  ### Local Development
33
40
 
34
41
  If you want to customize or contribute:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-handoff",
3
- "version": "0.3.2",
3
+ "version": "0.4.0",
4
4
  "type": "module",
5
5
  "description": "Create focused handoff prompts for continuing work in new OpenCode sessions",
6
6
  "author": "Josh Thomas <josh@joshthomas.dev>",
@@ -21,8 +21,8 @@
21
21
  "typecheck": "tsc --noEmit"
22
22
  },
23
23
  "dependencies": {
24
- "@opencode-ai/plugin": "^1.0.143",
25
- "@opencode-ai/sdk": "^1.0.143",
24
+ "@opencode-ai/plugin": "^1.0.188",
25
+ "@opencode-ai/sdk": "^1.0.188",
26
26
  "zod": "^4.1.13"
27
27
  },
28
28
  "devDependencies": {
package/src/tools.ts CHANGED
@@ -32,16 +32,7 @@ export const HandoffSession = (client: OpencodeClient) => {
32
32
  ? `${sessionReference}\n\n${fileRefs}\n\n${args.prompt}`
33
33
  : `${sessionReference}\n\n${args.prompt}`
34
34
 
35
- // Double-append workaround for textarea resize bug:
36
- // appendPrompt uses insertText() which bypasses onContentChange, so resize never triggers.
37
- // First append sets height in old session, session_new preserves textarea element,
38
- // second append populates new session with already-expanded textarea.
39
- await client.tui.clearPrompt()
40
- await new Promise(r => setTimeout(r, 50))
41
- await client.tui.appendPrompt({ body: { text: fullPrompt } })
42
35
  await client.tui.executeCommand({ body: { command: "session_new" } })
43
- await client.tui.clearPrompt()
44
- await new Promise(r => setTimeout(r, 50))
45
36
  await client.tui.appendPrompt({ body: { text: fullPrompt } })
46
37
 
47
38
  await client.tui.showToast({