Skip to content

Commit 5d9d923

Browse files
committed
Update useSession.ts
1 parent 5bdb2b4 commit 5d9d923

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

apps/code/src/renderer/features/sessions/hooks/useSession.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -147,25 +147,6 @@ export const useThoughtLevelConfigOptionForTask = (
147147
return useConfigOptionForTask(taskId, "thought_level");
148148
};
149149

150-
/** Get context window usage for a task (used / size) */
151-
export const useContextUsageForTask = (
152-
taskId: string | undefined,
153-
): { used: number; size: number } | undefined => {
154-
return useSessionStore((s) => {
155-
if (!taskId) return undefined;
156-
const taskRunId = s.taskIdIndex[taskId];
157-
if (!taskRunId) return undefined;
158-
const session = s.sessions[taskRunId];
159-
if (
160-
session?.contextUsed === undefined ||
161-
session?.contextSize === undefined
162-
) {
163-
return undefined;
164-
}
165-
return { used: session.contextUsed, size: session.contextSize };
166-
});
167-
};
168-
169150
/** Get the adapter type for a task */
170151
export const useAdapterForTask = (
171152
taskId: string | undefined,

0 commit comments

Comments
 (0)