chore: remove tokenlens and token usage tracking (#1357)

This commit is contained in:
josh 2025-12-15 16:56:10 +00:00 committed by GitHub
parent 5f9e231788
commit 7942e97095
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 60 additions and 773 deletions

View file

@ -34,9 +34,7 @@ import {
modelsByProvider,
} from "@/lib/ai/models";
import type { Attachment, ChatMessage } from "@/lib/types";
import type { AppUsage } from "@/lib/usage";
import { cn } from "@/lib/utils";
import { Context } from "./elements/context";
import {
PromptInput,
PromptInputSubmit,
@ -71,7 +69,6 @@ function PureMultimodalInput({
selectedVisibilityType,
selectedModelId,
onModelChange,
usage,
}: {
chatId: string;
input: string;
@ -87,7 +84,6 @@ function PureMultimodalInput({
selectedVisibilityType: VisibilityType;
selectedModelId: string;
onModelChange?: (modelId: string) => void;
usage?: AppUsage;
}) {
const textareaRef = useRef<HTMLTextAreaElement>(null);
const { width } = useWindowSize();
@ -204,13 +200,6 @@ function PureMultimodalInput({
}
}, []);
const contextProps = useMemo(
() => ({
usage,
}),
[usage]
);
const handleFileChange = useCallback(
async (event: ChangeEvent<HTMLInputElement>) => {
const files = Array.from(event.target.files || []);
@ -374,8 +363,7 @@ function PureMultimodalInput({
ref={textareaRef}
rows={1}
value={input}
/>{" "}
<Context {...contextProps} />
/>
</div>
<PromptInputToolbar className="border-top-0! border-t-0! p-0 shadow-none dark:border-0 dark:border-transparent!">
<PromptInputTools className="gap-0 sm:gap-0.5">