feat: simplify listen command - remove binding flags, add auto-genera… (#1111)

Co-authored-by: Letta <noreply@letta.com>
This commit is contained in:
Shubham Naik
2026-02-24 14:11:10 -08:00
committed by GitHub
parent a086957407
commit eb210f22b4
8 changed files with 253 additions and 158 deletions

View File

@@ -6451,23 +6451,17 @@ export default function App({
);
let name: string | undefined;
let listenAgentId: string | undefined;
let _listenAgentId: string | undefined;
for (let i = 1; i < parts.length; i++) {
const part = parts[i];
const nextPart = parts[i + 1];
if (part === "--name" && nextPart) {
if (part === "--env-name" && nextPart) {
name = nextPart;
i++;
} else if (part === "--agent" && nextPart) {
listenAgentId = nextPart;
i++;
}
}
// Default to current agent if not specified
const targetAgentId = listenAgentId || agentId;
const cmd = commandRunner.start(msg, "Starting listener...");
const { handleListen, setActiveCommandId: setActiveListenCommandId } =
await import("./commands/listen");
@@ -6478,9 +6472,11 @@ export default function App({
buffersRef,
refreshDerived,
setCommandRunning,
agentId,
conversationId: conversationIdRef.current,
},
msg,
{ name, agentId: targetAgentId },
{ envName: name },
);
} finally {
setActiveListenCommandId(null);