fix: resolve plugin tool meta typing

This commit is contained in:
Peter Steinberger
2026-01-18 04:24:16 +00:00
parent fabc2882aa
commit 82e49af5a7
10 changed files with 78 additions and 67 deletions

View File

@@ -73,13 +73,11 @@ export function deriveGroupSessionPatch(params: {
const normalizedChannel = normalizeChannelId(channel);
const isChannelProvider = Boolean(
normalizedChannel &&
getChannelDock(normalizedChannel)?.capabilities.chatTypes.includes("channel"),
getChannelDock(normalizedChannel)?.capabilities.chatTypes.includes("channel"),
);
const nextGroupChannel =
explicitChannel ??
((resolution.chatType === "channel" || isChannelProvider) &&
subject &&
subject.startsWith("#")
((resolution.chatType === "channel" || isChannelProvider) && subject && subject.startsWith("#")
? subject
: undefined);
const nextSubject = nextGroupChannel ? undefined : subject;

View File

@@ -406,7 +406,10 @@ export async function updateLastRoute(params: {
lastTo: normalized.lastTo,
lastAccountId: normalized.lastAccountId,
};
const next = mergeSessionEntry(existing, metaPatch ? { ...basePatch, ...metaPatch } : basePatch);
const next = mergeSessionEntry(
existing,
metaPatch ? { ...basePatch, ...metaPatch } : basePatch,
);
store[sessionKey] = next;
await saveSessionStoreUnlocked(storePath, store);
return next;