@jc01rho/opencode-smart-title 0.3.9 → 0.3.11
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 +69 -30
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +73 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,18 +1,41 @@
|
|
|
1
1
|
# Smart Title Plugin
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An OpenCode plugin that generates better session titles from conversation context and keeps the terminal window title in sync with session activity.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> [!WARNING]
|
|
6
|
+
> This project has only been tested in **Windows Terminal + WSL2 Ubuntu**.
|
|
7
|
+
> Terminal title updates are terminal-dependent, so behavior in other terminals, shells, tmux setups, or operating systems may differ.
|
|
6
8
|
|
|
7
|
-
## What
|
|
9
|
+
## What this plugin does
|
|
8
10
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
11
|
+
- Generates short, meaningful session titles with AI
|
|
12
|
+
- Triggers title generation when the root session becomes idle
|
|
13
|
+
- Skips AI title generation for subagent sessions
|
|
14
|
+
- Updates the terminal title to reflect current activity
|
|
15
|
+
- Shows terminal activity states as:
|
|
16
|
+
- `🟢 <project>` while the root session is active
|
|
17
|
+
- `🤖 <project>` when only subagents are active
|
|
18
|
+
- `💤 <project>` when the session is idle
|
|
19
|
+
- Avoids redundant terminal writes and duplicate in-flight title updates
|
|
20
|
+
- Uses OpenCode authentication flow instead of requiring separate API keys in this plugin
|
|
21
|
+
|
|
22
|
+
## How it works
|
|
23
|
+
|
|
24
|
+
The main title update flow starts from the plugin event handler in `index.ts`.
|
|
25
|
+
|
|
26
|
+
1. The plugin listens for `session.idle` events.
|
|
27
|
+
2. When the idle threshold is reached, it collects smart conversation context.
|
|
28
|
+
3. It generates a session title with the configured model or a fallback model.
|
|
29
|
+
4. It updates the OpenCode session title.
|
|
30
|
+
5. In parallel, it updates the terminal window title using OSC title sequences on a best-effort basis.
|
|
31
|
+
|
|
32
|
+
Because terminal title updates rely on escape sequences instead of a dedicated terminal plugin API, terminal support is not guaranteed outside the tested environment.
|
|
33
|
+
|
|
34
|
+
## Requirements
|
|
35
|
+
|
|
36
|
+
- OpenCode with plugin support
|
|
37
|
+
- `@opencode-ai/plugin` version `>=0.13.7`
|
|
38
|
+
- An authenticated provider available through your OpenCode setup
|
|
16
39
|
|
|
17
40
|
## Installation
|
|
18
41
|
|
|
@@ -20,7 +43,7 @@ It also syncs your terminal window title with the current project and session ac
|
|
|
20
43
|
npm install @jc01rho/opencode-smart-title
|
|
21
44
|
```
|
|
22
45
|
|
|
23
|
-
|
|
46
|
+
Then add the plugin to your OpenCode config:
|
|
24
47
|
|
|
25
48
|
```json
|
|
26
49
|
{
|
|
@@ -30,45 +53,61 @@ Add to `~/.config/opencode/opencode.json`:
|
|
|
30
53
|
|
|
31
54
|
## Configuration
|
|
32
55
|
|
|
33
|
-
The plugin supports both global and project-level configuration
|
|
56
|
+
The plugin supports both global and project-level configuration.
|
|
57
|
+
|
|
58
|
+
- Global config: `~/.config/opencode/smart-title.jsonc`
|
|
59
|
+
- Project config: `.opencode/smart-title.jsonc`
|
|
34
60
|
|
|
35
|
-
|
|
36
|
-
- **Project:** `.opencode/smart-title.jsonc` - Overrides global config
|
|
61
|
+
If no global config exists yet, the plugin creates a default one on first run.
|
|
37
62
|
|
|
38
|
-
|
|
63
|
+
Project config overrides global config.
|
|
64
|
+
|
|
65
|
+
### Example config
|
|
39
66
|
|
|
40
67
|
```jsonc
|
|
41
68
|
{
|
|
42
69
|
// Enable or disable the plugin
|
|
43
70
|
"enabled": true,
|
|
44
71
|
|
|
45
|
-
//
|
|
72
|
+
// Write debug logs to ~/.config/opencode/logs/smart-title/YYYY-MM-DD.log
|
|
46
73
|
"debug": false,
|
|
47
74
|
|
|
48
|
-
// Optional:
|
|
75
|
+
// Optional: force a specific model
|
|
76
|
+
// Format: "provider/model"
|
|
49
77
|
// "model": "anthropic/claude-haiku-4-5",
|
|
50
78
|
|
|
51
|
-
//
|
|
79
|
+
// Generate a title every N idle events
|
|
52
80
|
"updateThreshold": 1
|
|
53
81
|
}
|
|
54
82
|
```
|
|
55
83
|
|
|
56
|
-
## Terminal
|
|
84
|
+
## Terminal title behavior
|
|
85
|
+
|
|
86
|
+
Terminal title sync is best-effort.
|
|
87
|
+
|
|
88
|
+
- The plugin writes OSC title sequences to an available TTY stream
|
|
89
|
+
- It includes tmux/screen-compatible wrapping when needed
|
|
90
|
+
- It sanitizes terminal title content before writing
|
|
91
|
+
- It skips writes when no TTY is available
|
|
92
|
+
- It avoids rewriting the same title repeatedly
|
|
93
|
+
|
|
94
|
+
This part of the plugin is the most environment-sensitive behavior in the project.
|
|
95
|
+
If you are not using Windows Terminal with WSL2 Ubuntu, expect possible differences.
|
|
57
96
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
97
|
+
## Development
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
npm run typecheck
|
|
101
|
+
npm run build
|
|
102
|
+
```
|
|
63
103
|
|
|
64
|
-
##
|
|
104
|
+
## Package contents
|
|
65
105
|
|
|
66
|
-
|
|
106
|
+
The published package includes:
|
|
67
107
|
|
|
68
|
-
- `
|
|
69
|
-
- `
|
|
70
|
-
-
|
|
71
|
-
- Keep the `package.json` version updated before pushing the `v*` tag that should create the GitHub Release and publish to npm
|
|
108
|
+
- `dist/`
|
|
109
|
+
- `README.md`
|
|
110
|
+
- `LICENSE`
|
|
72
111
|
|
|
73
112
|
## License
|
|
74
113
|
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAWjD,QAAA,MAAM,gBAAgB,EAAE,MAoTvB,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { getRootSessionID, isSubagentSession, sessionIdleCount } from "./lib/ses
|
|
|
17
17
|
import { join } from "path";
|
|
18
18
|
import { homedir } from "os";
|
|
19
19
|
const SUBAGENT_ACTIVITY_TTL_MS = 5 * 60 * 1000;
|
|
20
|
+
const IDLE_DEBOUNCE_MS = 3000;
|
|
20
21
|
const SmartTitlePlugin = async (ctx) => {
|
|
21
22
|
const config = getConfig(ctx);
|
|
22
23
|
if (!config.enabled) {
|
|
@@ -27,12 +28,17 @@ const SmartTitlePlugin = async (ctx) => {
|
|
|
27
28
|
let lastTerminalStatusSync = null;
|
|
28
29
|
const rootSessionStatuses = new Map();
|
|
29
30
|
const activeSubagentsByRoot = new Map();
|
|
31
|
+
const pendingIdleTimers = new Map();
|
|
30
32
|
const getEventSessionId = (event) => {
|
|
31
33
|
if (!event.properties || typeof event.properties !== "object") {
|
|
32
34
|
return undefined;
|
|
33
35
|
}
|
|
34
36
|
if (!("sessionID" in event.properties)) {
|
|
35
|
-
|
|
37
|
+
if (!("info" in event.properties) || !event.properties.info || typeof event.properties.info !== "object") {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const { id } = event.properties.info;
|
|
41
|
+
return typeof id === "string" ? id : undefined;
|
|
36
42
|
}
|
|
37
43
|
const { sessionID } = event.properties;
|
|
38
44
|
return typeof sessionID === "string" ? sessionID : undefined;
|
|
@@ -87,6 +93,16 @@ const SmartTitlePlugin = async (ctx) => {
|
|
|
87
93
|
}
|
|
88
94
|
return "idle";
|
|
89
95
|
};
|
|
96
|
+
const cancelPendingIdleTimer = (rootSessionId) => {
|
|
97
|
+
const timer = pendingIdleTimers.get(rootSessionId);
|
|
98
|
+
if (timer) {
|
|
99
|
+
clearTimeout(timer);
|
|
100
|
+
pendingIdleTimers.delete(rootSessionId);
|
|
101
|
+
logger.debug("terminal-title", "Cancelled pending idle timer due to running event", {
|
|
102
|
+
rootSessionId
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
};
|
|
90
106
|
const syncTerminalStatus = async (sessionId, status) => {
|
|
91
107
|
if (!sessionId) {
|
|
92
108
|
return;
|
|
@@ -95,12 +111,38 @@ const SmartTitlePlugin = async (ctx) => {
|
|
|
95
111
|
const rootSessionId = isSubagent
|
|
96
112
|
? await getRootSessionID(client, sessionId, logger)
|
|
97
113
|
: sessionId;
|
|
114
|
+
if (status === "running") {
|
|
115
|
+
cancelPendingIdleTimer(rootSessionId);
|
|
116
|
+
}
|
|
98
117
|
if (isSubagent) {
|
|
99
|
-
|
|
118
|
+
if (status === "running") {
|
|
119
|
+
markSubagentActivity(rootSessionId, sessionId, true);
|
|
120
|
+
}
|
|
100
121
|
}
|
|
101
122
|
else {
|
|
102
123
|
rootSessionStatuses.set(rootSessionId, status);
|
|
103
124
|
}
|
|
125
|
+
if (status === "idle") {
|
|
126
|
+
if (pendingIdleTimers.has(rootSessionId)) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const timer = setTimeout(() => {
|
|
130
|
+
pendingIdleTimers.delete(rootSessionId);
|
|
131
|
+
const effectiveStatus = getEffectiveTerminalStatus(rootSessionId);
|
|
132
|
+
if (lastTerminalStatusSync?.rootSessionId === rootSessionId &&
|
|
133
|
+
lastTerminalStatusSync.status === effectiveStatus) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
updateTerminalTitle(ctx.directory, effectiveStatus, logger);
|
|
137
|
+
lastTerminalStatusSync = { rootSessionId, status: effectiveStatus };
|
|
138
|
+
logger.debug("terminal-title", "Debounced idle sync applied", {
|
|
139
|
+
rootSessionId,
|
|
140
|
+
effectiveStatus
|
|
141
|
+
});
|
|
142
|
+
}, IDLE_DEBOUNCE_MS);
|
|
143
|
+
pendingIdleTimers.set(rootSessionId, timer);
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
104
146
|
const effectiveStatus = getEffectiveTerminalStatus(rootSessionId);
|
|
105
147
|
if (lastTerminalStatusSync?.rootSessionId === rootSessionId &&
|
|
106
148
|
lastTerminalStatusSync.status === effectiveStatus) {
|
|
@@ -118,6 +160,31 @@ const SmartTitlePlugin = async (ctx) => {
|
|
|
118
160
|
rootStatus: rootSessionStatuses.get(rootSessionId) ?? "idle"
|
|
119
161
|
});
|
|
120
162
|
};
|
|
163
|
+
const clearSubagentActivity = async (sessionId) => {
|
|
164
|
+
if (!sessionId) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const isSubagent = await isSubagentSession(client, sessionId, logger);
|
|
168
|
+
if (!isSubagent) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const rootSessionId = await getRootSessionID(client, sessionId, logger);
|
|
172
|
+
markSubagentActivity(rootSessionId, sessionId, false);
|
|
173
|
+
const effectiveStatus = getEffectiveTerminalStatus(rootSessionId);
|
|
174
|
+
if (lastTerminalStatusSync?.rootSessionId === rootSessionId &&
|
|
175
|
+
lastTerminalStatusSync.status === effectiveStatus) {
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
updateTerminalTitle(ctx.directory, effectiveStatus, logger);
|
|
179
|
+
lastTerminalStatusSync = { rootSessionId, status: effectiveStatus };
|
|
180
|
+
logger.debug("terminal-title", "Cleared subagent activity from terminal state", {
|
|
181
|
+
sessionId,
|
|
182
|
+
rootSessionId,
|
|
183
|
+
effectiveStatus,
|
|
184
|
+
activeSubagentCount: activeSubagentsByRoot.get(rootSessionId)?.size ?? 0,
|
|
185
|
+
rootStatus: rootSessionStatuses.get(rootSessionId) ?? "idle"
|
|
186
|
+
});
|
|
187
|
+
};
|
|
121
188
|
logger.info('plugin', 'Smart Title plugin initialized', {
|
|
122
189
|
enabled: config.enabled,
|
|
123
190
|
debug: config.debug,
|
|
@@ -130,6 +197,10 @@ const SmartTitlePlugin = async (ctx) => {
|
|
|
130
197
|
return {
|
|
131
198
|
event: async ({ event }) => {
|
|
132
199
|
const sessionId = getEventSessionId(event);
|
|
200
|
+
if (event.type === "session.deleted") {
|
|
201
|
+
await clearSubagentActivity(sessionId);
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
133
204
|
const isLegacyIdleEvent = event.type === "session.status" &&
|
|
134
205
|
event.properties.status?.type === "idle";
|
|
135
206
|
const isIdleEvent = event.type === "session.idle" || isLegacyIdleEvent;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAuB,MAAM,gBAAgB,CAAA;AAC7F,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AACxF,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAA;AAE5B,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,kBAAkB,EA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AA;QAClD,CAAC;QACD,wBAAwB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC9C,MAAM,kBAAkB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAClD,CAAC;QACD,qBAAqB,EAAE,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE;YAC3C,MAAM,kBAAkB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAA;QAClD,CAAC;KACJ,CAAA;AACL,CAAC,CAAA;AAED,eAAe,gBAAgB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@jc01rho/opencode-smart-title",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.11",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "OpenCode plugin that automatically generates meaningful session titles using AI and smart context selection",
|
|
7
7
|
"main": "./dist/index.js",
|