mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-31 01:37:28 +08:00
fix(cli): improve model info panel scrollbar padding and capabilities display
This commit is contained in:
@@ -61,6 +61,7 @@ export function ModelInfoPanel(props: Props) {
|
||||
>
|
||||
<scrollbox
|
||||
maxHeight={maxHeight()}
|
||||
paddingRight={1}
|
||||
>
|
||||
<box>
|
||||
<text fg={theme.text} attributes={TextAttributes.BOLD}>
|
||||
@@ -114,22 +115,34 @@ export function ModelInfoPanel(props: Props) {
|
||||
</box>
|
||||
</Show>
|
||||
<Show when={caps()?.reasoning || inputLine() || outputLine()}>
|
||||
<text fg={theme.textMuted}></text>
|
||||
<box flexDirection="column">
|
||||
<Show when={caps()?.reasoning}>
|
||||
<text fg={theme.textMuted}> [Reasoning]</text>
|
||||
<box flexDirection="row" justifyContent="space-between">
|
||||
<text fg={theme.textMuted}>Reasoning</text>
|
||||
<text fg={theme.text}>Yes</text>
|
||||
</box>
|
||||
</Show>
|
||||
<Show when={inputLine()}>
|
||||
{(line) => <text fg={theme.textMuted}> {line()}</text>}
|
||||
{(line) => (
|
||||
<box flexDirection="row" justifyContent="space-between">
|
||||
<text fg={theme.textMuted}>Caps</text>
|
||||
<text fg={theme.text}>{line().replace(/^In:\s*/, "")}</text>
|
||||
</box>
|
||||
)}
|
||||
</Show>
|
||||
<Show when={outputLine()}>
|
||||
{(line) => <text fg={theme.textMuted}> {line()}</text>}
|
||||
{(line) => (
|
||||
<box flexDirection="row" justifyContent="space-between">
|
||||
<text fg={theme.textMuted}>Out</text>
|
||||
<text fg={theme.text}>{line().replace(/^Out:\s*/, "")}</text>
|
||||
</box>
|
||||
)}
|
||||
</Show>
|
||||
</box>
|
||||
<text fg={theme.textMuted}></text>
|
||||
</Show>
|
||||
<Show when={desc()}>
|
||||
<text fg={theme.textMuted} width={28}>
|
||||
<text fg={theme.textMuted}>{" "}</text>
|
||||
<text fg={theme.textMuted} width={23}>
|
||||
{desc()}
|
||||
</text>
|
||||
</Show>
|
||||
|
||||
@@ -22,8 +22,8 @@ describe("model info panel price formatting", () => {
|
||||
expect(fmtCachedPrice({ input: 0, output: 0, cache: { read: 0, write: 0 } })).toBe("Free")
|
||||
})
|
||||
|
||||
test("fmtCachedPrice returns N/A without cache read", () => {
|
||||
expect(fmtCachedPrice({ input: 3, output: 15, cache: { read: 0, write: 0 } })).toBe("N/A")
|
||||
test("fmtCachedPrice returns null without cache read", () => {
|
||||
expect(fmtCachedPrice({ input: 3, output: 15, cache: { read: 0, write: 0 } })).toBeNull()
|
||||
})
|
||||
|
||||
test("avgPrice uses cache weighted formula when cache read exists", () => {
|
||||
|
||||
Reference in New Issue
Block a user