refactor: trim guard helper exports

This commit is contained in:
Peter Steinberger
2026-05-01 21:04:53 +01:00
parent 064d455fd8
commit cb4cdaf710
2 changed files with 5 additions and 7 deletions

View File

@@ -4,8 +4,8 @@ import { findNormalizedProviderValue } from "./provider-id.js";
export const CONTEXT_WINDOW_HARD_MIN_TOKENS = 4_000;
export const CONTEXT_WINDOW_WARN_BELOW_TOKENS = 8_000;
export const CONTEXT_WINDOW_HARD_MIN_RATIO = 0.1;
export const CONTEXT_WINDOW_WARN_BELOW_RATIO = 0.2;
const CONTEXT_WINDOW_HARD_MIN_RATIO = 0.1;
const CONTEXT_WINDOW_WARN_BELOW_RATIO = 0.2;
export type ContextWindowSource = "model" | "modelsConfig" | "agentContextTokens" | "default";
@@ -79,7 +79,7 @@ export type ContextWindowGuardHint = {
likelySelfHosted: boolean;
};
export function resolveContextWindowGuardHint(params: {
function resolveContextWindowGuardHint(params: {
runtimeBaseUrl?: string | null;
}): ContextWindowGuardHint {
const endpoint = resolveProviderEndpoint(params.runtimeBaseUrl ?? undefined);

View File

@@ -120,7 +120,7 @@ export function resolveSubagentCapabilityStore(
return readSessionStore(storePath);
}
export function resolveSubagentRoleForDepth(params: {
function resolveSubagentRoleForDepth(params: {
depth: number;
maxSpawnDepth?: number;
}): SubagentSessionRole {
@@ -135,9 +135,7 @@ export function resolveSubagentRoleForDepth(params: {
return depth < maxSpawnDepth ? "orchestrator" : "leaf";
}
export function resolveSubagentControlScopeForRole(
role: SubagentSessionRole,
): SubagentControlScope {
function resolveSubagentControlScopeForRole(role: SubagentSessionRole): SubagentControlScope {
return role === "leaf" ? "none" : "children";
}