Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(web): gauge option for the composer's effort display #26802

ClosedPedroNavHur(GitHub profile, opens in a new tab)wants to merge 2 commits intomain fromrefs/pull/26802/headopened View on GitHub

Showing 6 changed files with 62 additions and 4 deletions (loading 3).

x
0 of 6 viewed, 6 left
7 additions and 3 deletionsapps/web/src/components/chat/ComposerModelEffort.tsxModified
View file
@@ -24,7 +24,7 @@
import type { ComposerControlSize } from "./ComposerControl";
import { ComposerPermissionsSection, type RuntimeModeOption } from "./ComposerFooterControls";
import { composerFloatingLayerProps, focusCheckedPermission } from "./composerEventScope";
-import { EffortGlyph, FastBolt, resolveEffortGlyph } from "./EffortGlyph";
+import { EffortGauge, EffortGlyph, FastBolt, resolveEffortGlyph } from "./EffortGlyph";
import { DockedPickerContext } from "./ProviderModelPicker";
import {
getTraitsSectionVisibility,
@@ -77,7 +77,7 @@
​
/**
- * What the model trigger shows after the model name: the effort word (or bars, per the
+ * What the model trigger shows after the model name: the effort word (or bars or a gauge, per the
* Appearance setting), a bolt for Fast, a workflow icon for Ultracode, and other traits such as a
* context window.
*/
@@ -155,7 +155,11 @@
{word}
</span>
) : glyph ? (
- <EffortGlyph count={glyph.count} filled={glyph.filled} size={size} />
+ effortDisplay === "gauge" ? (
+ <EffortGauge count={glyph.count} filled={glyph.filled} size={size} />
+ ) : (
+ <EffortGlyph count={glyph.count} filled={glyph.filled} size={size} />
+ )