@mtayfur/opencode-chat-tree 1.0.1 → 1.0.2
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 +3 -1
- package/dist/adapters/opencode-gateway.d.ts +1 -1
- package/dist/index.js +7 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -64,9 +64,11 @@ The plugin intentionally keeps its configuration small:
|
|
|
64
64
|
| Option | Default | Description |
|
|
65
65
|
| -------------- | ---------------------- | --------------------------------------- |
|
|
66
66
|
| `storageScope` | `global` | Use `global` or `local` tree metadata. |
|
|
67
|
-
| `model` |
|
|
67
|
+
| `model` | OpenCode `small_model` | Model used to generate branch handoffs. |
|
|
68
68
|
| `variant` | Model default | Model variant used for branch handoffs. |
|
|
69
69
|
|
|
70
|
+
When `model` is not set, branch handoffs use OpenCode's `small_model`.
|
|
71
|
+
|
|
70
72
|
Unknown options are ignored so removing an obsolete option does not prevent the plugin from loading.
|
|
71
73
|
|
|
72
74
|
## Controls
|
|
@@ -11,7 +11,7 @@ export type SummaryRequest = {
|
|
|
11
11
|
readonly messages: readonly ConversationEntry[];
|
|
12
12
|
readonly customInstructions?: string;
|
|
13
13
|
readonly signal?: AbortSignal;
|
|
14
|
-
readonly model
|
|
14
|
+
readonly model: SummaryModel;
|
|
15
15
|
readonly variant?: string;
|
|
16
16
|
};
|
|
17
17
|
export type CreatedBranch = {
|
package/dist/index.js
CHANGED
|
@@ -862,7 +862,7 @@ class OpenCodeTreeGateway {
|
|
|
862
862
|
directory: this.projectRoot,
|
|
863
863
|
agent: "summary",
|
|
864
864
|
system: SUMMARY_SYSTEM_PROMPT,
|
|
865
|
-
|
|
865
|
+
model: request.model,
|
|
866
866
|
...request.variant ? { variant: request.variant } : {},
|
|
867
867
|
parts: [
|
|
868
868
|
{
|
|
@@ -1448,6 +1448,10 @@ function createBranchWorkflow(input) {
|
|
|
1448
1448
|
failSummary("Tree transcripts are unavailable.");
|
|
1449
1449
|
return;
|
|
1450
1450
|
}
|
|
1451
|
+
if (!input.summaryModel) {
|
|
1452
|
+
failSummary("OpenCode small_model is not configured.");
|
|
1453
|
+
return;
|
|
1454
|
+
}
|
|
1451
1455
|
let messages;
|
|
1452
1456
|
try {
|
|
1453
1457
|
messages = collectSummaryMessages(input.selectedRow(), transcripts);
|
|
@@ -1460,9 +1464,7 @@ function createBranchWorkflow(input) {
|
|
|
1460
1464
|
const summaryRequest = {
|
|
1461
1465
|
messages,
|
|
1462
1466
|
signal: controller.signal,
|
|
1463
|
-
|
|
1464
|
-
model: input.summaryModel
|
|
1465
|
-
} : {},
|
|
1467
|
+
model: input.summaryModel,
|
|
1466
1468
|
...input.summaryVariant ? {
|
|
1467
1469
|
variant: input.summaryVariant
|
|
1468
1470
|
} : {}
|
|
@@ -2365,7 +2367,7 @@ var tui = async (api, rawOptions) => {
|
|
|
2365
2367
|
projectRoot,
|
|
2366
2368
|
storageRoot,
|
|
2367
2369
|
sessionId,
|
|
2368
|
-
summaryModel: configuration.model ?? readSummaryModel(api.state.config.
|
|
2370
|
+
summaryModel: configuration.model ?? readSummaryModel(api.state.config.small_model),
|
|
2369
2371
|
summaryVariant: configuration.variant,
|
|
2370
2372
|
navigateToSession: (targetSessionId) => {
|
|
2371
2373
|
api.route.navigate("session", { sessionID: targetSessionId });
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@mtayfur/opencode-chat-tree",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.2",
|
|
5
5
|
"description": "Conversation branching and navigation for the OpenCode TUI.",
|
|
6
6
|
"homepage": "https://github.com/mtayfur/opencode-plugins/tree/main/packages/chat-tree#readme",
|
|
7
7
|
"bugs": {
|