ohmyvibe 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/cli.js
CHANGED
|
@@ -135,6 +135,10 @@ export class ManagementBridge {
|
|
|
135
135
|
sandbox: typeof params.sandbox === "string" ? params.sandbox : undefined,
|
|
136
136
|
approvalPolicy: typeof params.approvalPolicy === "string" ? params.approvalPolicy : undefined,
|
|
137
137
|
});
|
|
138
|
+
case "renameSession":
|
|
139
|
+
return this.sessionManager.rename(String(params.sessionId), {
|
|
140
|
+
title: String(params.title ?? ""),
|
|
141
|
+
});
|
|
138
142
|
case "interruptSession":
|
|
139
143
|
await this.sessionManager.interrupt(String(params.sessionId));
|
|
140
144
|
return { ok: true };
|
|
@@ -140,6 +140,18 @@ export class SessionManager extends EventEmitter {
|
|
|
140
140
|
}
|
|
141
141
|
return this.getOrThrow(sessionId);
|
|
142
142
|
}
|
|
143
|
+
async rename(sessionId, input) {
|
|
144
|
+
const session = this.getSessionOrThrow(sessionId);
|
|
145
|
+
const nextTitle = typeof input.title === "string" ? input.title.trim() : "";
|
|
146
|
+
if (!nextTitle) {
|
|
147
|
+
throw new Error("Session title is required");
|
|
148
|
+
}
|
|
149
|
+
session.title = nextTitle;
|
|
150
|
+
this.touch(session);
|
|
151
|
+
this.persist();
|
|
152
|
+
this.emitChange({ type: "session-updated", session: this.toSummary(session) });
|
|
153
|
+
return this.getOrThrow(sessionId);
|
|
154
|
+
}
|
|
143
155
|
async sendMessage(sessionId, text) {
|
|
144
156
|
const session = this.getSessionOrThrow(sessionId);
|
|
145
157
|
await this.applyPendingConfig(session);
|