diff --git a/ui/src/components/AgentConfigForm.tsx b/ui/src/components/AgentConfigForm.tsx index 5dab6a1e..3b3d53c0 100644 --- a/ui/src/components/AgentConfigForm.tsx +++ b/ui/src/components/AgentConfigForm.tsx @@ -1,11 +1,6 @@ import { useState, useEffect, useRef, useMemo, useCallback } from "react"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { AGENT_ADAPTER_TYPES } from "@paperclipai/shared"; -import { - hasSessionCompactionThresholds, - resolveSessionCompactionPolicy, - type ResolvedSessionCompactionPolicy, -} from "@paperclipai/adapter-utils"; import type { Agent, AdapterEnvironmentTestResult, @@ -408,12 +403,6 @@ export function AgentConfigForm(props: AgentConfigFormProps) { heartbeat: mergedHeartbeat, }; }, [isCreate, overlay.heartbeat, runtimeConfig, val]); - const sessionCompaction = useMemo( - () => resolveSessionCompactionPolicy(adapterType, effectiveRuntimeConfig), - [adapterType, effectiveRuntimeConfig], - ); - const showSessionCompactionCard = Boolean(sessionCompaction.adapterSessionManagement); - return (
{/* ---- Floating Save button (edit mode, when dirty) ---- */} @@ -839,12 +828,6 @@ export function AgentConfigForm(props: AgentConfigFormProps) { numberHint={help.intervalSec} showNumber={val!.heartbeatEnabled} /> - {showSessionCompactionCard && ( - - )}
) : ( @@ -867,12 +850,6 @@ export function AgentConfigForm(props: AgentConfigFormProps) { numberHint={help.intervalSec} showNumber={eff("heartbeat", "enabled", heartbeat.enabled !== false)} /> - {showSessionCompactionCard && ( - - )} -
-
Session compaction
- - {sourceLabel} - -
-

- {nativeSummary} -

-

- {rotationDisabled - ? "No Paperclip-managed fresh-session thresholds are active for this adapter." - : "Paperclip will start a fresh session when one of these thresholds is reached."} -

-
-
-
Runs
-
{formatSessionThreshold(policy.maxSessionRuns, "runs")}
-
-
-
Raw input
-
{formatSessionThreshold(policy.maxRawInputTokens, "tokens")}
-
-
-
Age
-
{formatSessionThreshold(policy.maxSessionAgeHours, "hours")}
-
-
-

- A large cumulative raw token total does not mean the full session is resent on every heartbeat. - {source === "agent_override" && " This agent has an explicit runtimeConfig session compaction override."} -

- - ); -} - /* ---- Internal sub-components ---- */ const ENABLED_ADAPTER_TYPES = new Set(["claude_local", "codex_local", "gemini_local", "opencode_local", "cursor"]);