opencode-sidebar 0.1.0 → 0.1.1
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/dist/lib/opencode.js +0 -4
- package/package.json +2 -2
package/dist/lib/opencode.js
CHANGED
|
@@ -9,7 +9,6 @@ import { SoundNotifier } from "./notifications.js";
|
|
|
9
9
|
import { loadState, saveState, updateState } from "./state.js";
|
|
10
10
|
import { assertDirectoryExists, normalizeDirectory, sleep } from "./util.js";
|
|
11
11
|
import { describeTerminalBackend, getPreviewSessionID, killSessionWindow, listActiveSessions, openSessionWithPreferredTerminal, retitleSessionWindow, } from "./terminal.js";
|
|
12
|
-
const RECENT_COMPLETION_WINDOW_MS = 5 * 60_000;
|
|
13
12
|
async function isHealthy(port) {
|
|
14
13
|
try {
|
|
15
14
|
const response = await fetch(`http://${SERVER_HOST}:${port}/global/health`);
|
|
@@ -114,7 +113,6 @@ async function fetchPendingPermissions(client) {
|
|
|
114
113
|
return result.data ?? [];
|
|
115
114
|
}
|
|
116
115
|
function mergeSessionStatuses(sessions, statuses) {
|
|
117
|
-
const now = Date.now();
|
|
118
116
|
return sessions.map((session) => {
|
|
119
117
|
const status = statuses[session.id];
|
|
120
118
|
if (status) {
|
|
@@ -123,12 +121,10 @@ function mergeSessionStatuses(sessions, statuses) {
|
|
|
123
121
|
status,
|
|
124
122
|
};
|
|
125
123
|
}
|
|
126
|
-
const justCompleted = now - session.time.updated <= RECENT_COMPLETION_WINDOW_MS;
|
|
127
124
|
return {
|
|
128
125
|
...session,
|
|
129
126
|
status: {
|
|
130
127
|
type: "idle",
|
|
131
|
-
justCompleted,
|
|
132
128
|
},
|
|
133
129
|
};
|
|
134
130
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-sidebar",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "tmux sidebar launcher for OpenCode",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -64,4 +64,4 @@
|
|
|
64
64
|
"bun-types": "1.3.11",
|
|
65
65
|
"typescript": "5.8.3"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|