fix: add guard for default conversation id (#1245)
This commit is contained in:
10
src/index.ts
10
src/index.ts
@@ -47,6 +47,7 @@ import { settingsManager } from "./settings-manager";
|
||||
import { startStartupAutoUpdateCheck } from "./startup-auto-update";
|
||||
import { telemetry } from "./telemetry";
|
||||
import { loadTools } from "./tools/manager";
|
||||
import { debugLog } from "./utils/debug";
|
||||
import { markMilestone } from "./utils/timing";
|
||||
|
||||
// Stable empty array constants to prevent new references on every render
|
||||
@@ -629,7 +630,10 @@ async function main(): Promise<void> {
|
||||
// Validate shared mutual-exclusion rules for startup flags.
|
||||
try {
|
||||
validateFlagConflicts({
|
||||
guard: specifiedConversationId && specifiedConversationId !== "default",
|
||||
guard:
|
||||
specifiedConversationId &&
|
||||
specifiedConversationId !== "default" &&
|
||||
!specifiedConversationId.startsWith("agent-"),
|
||||
checks: [
|
||||
{
|
||||
when: specifiedAgentId,
|
||||
@@ -1193,6 +1197,10 @@ async function main(): Promise<void> {
|
||||
|
||||
// For explicit conversations, derive agent from conversation
|
||||
try {
|
||||
debugLog(
|
||||
"conversations",
|
||||
`retrieve(${specifiedConversationId}) [TUI conv→agent lookup]`,
|
||||
);
|
||||
const conversation = await client.conversations.retrieve(
|
||||
specifiedConversationId,
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user