File tree Expand file tree Collapse file tree 2 files changed +21
-2
lines changed
Expand file tree Collapse file tree 2 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -541,6 +541,18 @@ export const ActiveWorkspaceWithChat: Story = {
541541 projects,
542542 workspaces,
543543 apiOverrides : {
544+ tokenizer : {
545+ countTokens : ( ) => Promise . resolve ( 42 ) ,
546+ countTokensBatch : ( _model , texts ) => Promise . resolve ( texts . map ( ( ) => 42 ) ) ,
547+ calculateStats : ( ) =>
548+ Promise . resolve ( {
549+ consumers : [ ] ,
550+ totalTokens : 0 ,
551+ model : "mock-model" ,
552+ tokenizerName : "mock-tokenizer" ,
553+ usageHistory : [ ] ,
554+ } ) ,
555+ } ,
544556 providers : {
545557 setProviderConfig : ( ) => Promise . resolve ( { success : true , data : undefined } ) ,
546558 list : ( ) => Promise . resolve ( [ "anthropic" , "openai" , "xai" ] ) ,
@@ -1246,6 +1258,13 @@ main
12461258 } )
12471259 ) ;
12481260
1261+ // Pre-fill input with text so token count is visible
1262+ localStorage . setItem (
1263+ `input:${ workspaceId } ` ,
1264+ "Add OAuth2 support with Google and GitHub providers"
1265+ ) ;
1266+ localStorage . setItem ( `model:${ workspaceId } ` , "anthropic:claude-sonnet-4-5" ) ;
1267+
12491268 initialized . current = true ;
12501269 }
12511270
Original file line number Diff line number Diff line change @@ -879,7 +879,7 @@ export const ChatInput: React.FC<ChatInputProps> = (props) => {
879879 < Suspense
880880 fallback = {
881881 < div
882- className = "text-muted flex items-center gap-1 text-xs "
882+ className = "text-muted flex items-center gap-1 text-[11px] "
883883 data-component = "TokenEstimate"
884884 >
885885 < span > Calculating tokens…</ span >
@@ -940,7 +940,7 @@ const TokenCountDisplay: React.FC<{ reader: TokenCountReader }> = ({ reader }) =
940940 return null ;
941941 }
942942 return (
943- < div className = "text-muted flex items-center gap-1 text-xs " data-component = "TokenEstimate" >
943+ < div className = "text-muted flex items-center gap-1 text-[11px] " data-component = "TokenEstimate" >
944944 < span > { tokens . toLocaleString ( ) } tokens</ span >
945945 </ div >
946946 ) ;
You can’t perform that action at this time.
0 commit comments