Skip to content

Commit 86ec25a

Browse files
MarcMcIntoshJegernOUTT
authored andcommitted
fix: remove usage limits ui.
1 parent a7e1172 commit 86ec25a

File tree

3 files changed

+1
-68
lines changed

3 files changed

+1
-68
lines changed

refact-agent/gui/src/components/ChatForm/ChatForm.tsx

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import {
1919
useSendChatRequest,
2020
useCompressChat,
2121
useAutoFocusOnce,
22-
useTotalTokenUsage,
2322
} from "../../hooks";
2423
import { ErrorCallout, Callout } from "../Callout";
2524
import { ComboBox } from "../ComboBox";
@@ -35,7 +34,6 @@ import { useInputValue } from "./useInputValue";
3534
import {
3635
clearInformation,
3736
getInformationMessage,
38-
setInformation,
3937
} from "../../features/Errors/informationSlice";
4038
import { InformationCallout } from "../Callout/Callout";
4139
import { ToolConfirmation } from "./ToolConfirmation";
@@ -98,18 +96,6 @@ export const ChatForm: React.FC<ChatFormProps> = ({
9896
const autoFocus = useAutoFocusOnce();
9997
const attachedFiles = useAttachedFiles();
10098

101-
const { limitReached, tokens, limit } = useTotalTokenUsage();
102-
103-
useEffect(() => {
104-
if (limitReached) {
105-
dispatch(
106-
setInformation(
107-
`Token Limit reached, ${tokens} out of ${limit} used. To continue click the compress button or start a new chat.`,
108-
),
109-
);
110-
}
111-
}, [tokens, limit, limitReached, dispatch]);
112-
11399
const shouldAgentCapabilitiesBeShown = useMemo(() => {
114100
return threadToolUse === "agent";
115101
}, [threadToolUse]);
@@ -322,11 +308,7 @@ export const ChatForm: React.FC<ChatFormProps> = ({
322308

323309
if (information) {
324310
return (
325-
<InformationCallout
326-
mt="2"
327-
onClick={onClearInformation}
328-
timeout={limitReached ? null : 2000}
329-
>
311+
<InformationCallout mt="2" onClick={onClearInformation} timeout={2000}>
330312
{information}
331313
</InformationCallout>
332314
);
@@ -386,7 +368,6 @@ export const ChatForm: React.FC<ChatFormProps> = ({
386368
data-testid="chat-form-textarea"
387369
required={true}
388370
// disabled={isStreaming}
389-
disabled={limitReached}
390371
{...props}
391372
autoFocus={autoFocus}
392373
style={{ boxShadow: "none", outline: "none" }}

refact-agent/gui/src/hooks/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,3 @@ export * from "./useAutoFocusOnce";
3636
export * from "./useHideScroll";
3737
export * from "./useCompressionStop";
3838
export * from "./useEventBusForApp";
39-
export * from "./useTotalTokenUsage";

refact-agent/gui/src/hooks/useTotalTokenUsage.ts

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)