chore: Fix TypeScript errors 2/n.

This commit is contained in:
cpojer
2026-01-31 16:42:40 +09:00
parent e5eb9610dc
commit 952b0f8c48
8 changed files with 21 additions and 19 deletions

View File

@@ -10,6 +10,7 @@ import {
resolveSessionReference,
resolveMainSessionAlias,
resolveInternalSessionKey,
SessionListRow,
stripToolMessages,
} from "./sessions-helpers.js";
@@ -28,7 +29,7 @@ async function isSpawnedSessionAllowed(params: {
targetSessionKey: string;
}): Promise<boolean> {
try {
const list = await callGateway({
const list = await callGateway<{ sessions: Array<SessionListRow> }>({
method: "sessions.list",
params: {
includeGlobal: false,
@@ -126,7 +127,7 @@ export function createSessionsHistoryTool(opts?: {
? Math.max(1, Math.floor(params.limit))
: undefined;
const includeTools = Boolean(params.includeTools);
const result = await callGateway({
const result = await callGateway<{ messages: Array<unknown> }>({
method: "chat.history",
params: { sessionKey: resolvedKey, limit },
});