@distlang/opencode-plugin 0.2.4 → 0.2.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 CHANGED
@@ -124,7 +124,7 @@ Commands:
124
124
  - `/distlang-status`: show whether uploads are enabled, whether auth is available, and whether recent Agent Debugger sessions are visible
125
125
  - `/distlang-start`: sign in if needed and enable Agent Debugger uploads
126
126
  - `/distlang-stop`: disable Agent Debugger uploads and sign out of Distlang
127
- - `/distlang-view [session-id]`: open the latest uploaded OpenCode Agent Debugger session in the browser, or the provided session id
127
+ - `/distlang-view [session-id]`: open the latest uploaded OpenCode Agent Debugger session, the provided session id, or the Agent Debugger overview when no session is available yet
128
128
 
129
129
  Legacy aliases remain available: `/distlang status`, `/distlang start`, `/distlang stop`, `/distlang login`, and `/distlang logout`.
130
130
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distlang/opencode-plugin",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "OpenCode plugin for Distlang Agent Debugger",
5
5
  "type": "module",
6
6
  "main": "./src/index.js",
package/src/index.js CHANGED
@@ -100,6 +100,10 @@ export const DistlangAgentDebugger = async ({ project, directory, client }) => {
100
100
  return id ? `${dashboardBaseUrl()}/agent-debugger/sessions/${encodeURIComponent(id)}` : "";
101
101
  }
102
102
 
103
+ function agentDebuggerUrl() {
104
+ return `${dashboardBaseUrl()}/agent-debugger`;
105
+ }
106
+
103
107
  function openerCommand() {
104
108
  if (process.platform === "darwin") return { command: "open", args: [] };
105
109
  if (process.platform === "win32") return { command: "cmd", args: ["/c", "start", ""] };
@@ -231,20 +235,23 @@ export const DistlangAgentDebugger = async ({ project, directory, client }) => {
231
235
  return;
232
236
  }
233
237
  const sessionID = commandArgument(invocation, action) || firstSessionID(sessions);
234
- const url = sessionUrl(sessionID);
235
- if (!url) {
236
- await maybeLogCommandResult("warn", "No uploaded OpenCode Agent Debugger session found yet", {
238
+ const url = sessionID ? sessionUrl(sessionID) : agentDebuggerUrl();
239
+ const opened = await openUrl(url);
240
+ if (!sessionID) {
241
+ await maybeLogCommandResult("info", `Open Distlang Agent Debugger: ${url}`, {
237
242
  source,
238
243
  action,
239
244
  state,
240
245
  distlang: resolved,
241
246
  auth,
247
+ session_id: null,
248
+ url,
249
+ opened,
250
+ fallback: "agent_debugger_overview",
242
251
  sessions,
243
- command_hint: "Run a prompt first, wait for upload, then run /distlang-view again",
244
252
  });
245
253
  return;
246
254
  }
247
- const opened = await openUrl(url);
248
255
  await maybeLogCommandResult("info", `Open Distlang Agent Debugger session: ${url}`, {
249
256
  source,
250
257
  action,