@howaboua/opencode-chat 0.1.4 → 0.1.5
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 +2 -2
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +4 -3
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +3 -1
- package/dist/tools/write.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ Add to your `opencode.json`:
|
|
|
29
29
|
|
|
30
30
|
```json
|
|
31
31
|
{
|
|
32
|
-
"plugin": ["@howaboua/opencode-chat"]
|
|
32
|
+
"plugin": ["@howaboua/opencode-chat@latest"]
|
|
33
33
|
}
|
|
34
34
|
```
|
|
35
35
|
|
|
@@ -39,7 +39,7 @@ OpenCode automatically installs the plugin on next launch.
|
|
|
39
39
|
|
|
40
40
|
```json
|
|
41
41
|
{
|
|
42
|
-
"plugin": ["@howaboua/opencode-chat@0.1.
|
|
42
|
+
"plugin": ["@howaboua/opencode-chat@0.1.5"]
|
|
43
43
|
}
|
|
44
44
|
```
|
|
45
45
|
|
package/dist/tools/edit.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../tools/edit.ts"],"names":[],"mappings":"AAWA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;gBACrC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../tools/edit.ts"],"names":[],"mappings":"AAWA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;gBACrC;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,OAAO,CAAA;KAAE;;;;;;;;;;;;;;;;EAkC1G"}
|
package/dist/tools/edit.js
CHANGED
|
@@ -27,9 +27,10 @@ export function createChatEdit(baseDir, repoRoot) {
|
|
|
27
27
|
|
|
28
28
|
Usage:
|
|
29
29
|
- Read the file first before editing
|
|
30
|
-
-
|
|
31
|
-
- Fails if oldString not found or
|
|
32
|
-
- Use replaceAll
|
|
30
|
+
- EXACT MATCH REQUIRED: oldString must match character-for-character (case, whitespace, line breaks, Unicode)
|
|
31
|
+
- Fails if oldString not found or appears multiple times (unless replaceAll=true)
|
|
32
|
+
- Use replaceAll only when you want every occurrence replaced
|
|
33
|
+
- Prefer chat_write for large or multi-section changes`,
|
|
33
34
|
args: {
|
|
34
35
|
filePath: tool.schema.string().describe("The absolute path to the file to modify"),
|
|
35
36
|
oldString: tool.schema.string().describe("The text to replace"),
|
package/dist/tools/read.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../tools/read.ts"],"names":[],"mappings":"AAWA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM;;gBACnB;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"read.d.ts","sourceRoot":"","sources":["../../tools/read.ts"],"names":[],"mappings":"AAWA,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM;;gBACnB;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;EA+D/E"}
|
package/dist/tools/read.js
CHANGED
|
@@ -54,9 +54,11 @@ export function createChatRead(baseDir) {
|
|
|
54
54
|
|
|
55
55
|
Usage:
|
|
56
56
|
- Returns line-numbered output
|
|
57
|
+
- Shows end-of-file or continuation message
|
|
57
58
|
- Default limit is 2000 lines
|
|
58
59
|
- Use offset and limit for large files
|
|
59
|
-
- Long lines (>2000 chars) are truncated
|
|
60
|
+
- Long lines (>2000 chars) are truncated
|
|
61
|
+
- Example: offset=99, limit=50 reads lines 100-150`,
|
|
60
62
|
args: {
|
|
61
63
|
filePath: tool.schema.string().describe("The path to the file to read"),
|
|
62
64
|
offset: tool.schema.number().optional().describe("The line number to start reading from (0-based)"),
|
package/dist/tools/write.js
CHANGED
|
@@ -22,9 +22,9 @@ export function createChatWrite(baseDir, repoRoot) {
|
|
|
22
22
|
description: `Write file contents.
|
|
23
23
|
|
|
24
24
|
Usage:
|
|
25
|
-
- Overwrites
|
|
25
|
+
- Overwrites entire file (no append)
|
|
26
26
|
- Creates parent directories if needed
|
|
27
|
-
- Use
|
|
27
|
+
- Use chat_edit for small targeted changes`,
|
|
28
28
|
args: {
|
|
29
29
|
content: tool.schema.string().describe("The content to write to the file"),
|
|
30
30
|
filePath: tool.schema.string().describe("The absolute path to the file to write"),
|