|
|
@@ -919,8 +919,8 @@ export function Session() {
|
|
|
paddingLeft: 1,
|
|
|
visible: showScrollbar(),
|
|
|
trackOptions: {
|
|
|
- backgroundColor: themeV2.raise(themeV2.background.surface.offset()),
|
|
|
- foregroundColor: themeV2.border(),
|
|
|
+ backgroundColor: themeV2.raise(themeV2.background.surface.offset),
|
|
|
+ foregroundColor: themeV2.border.default,
|
|
|
},
|
|
|
}}
|
|
|
stickyScroll={!navigationMessage()}
|
|
|
@@ -1098,8 +1098,8 @@ function BackgroundToolHint(props: { messages: SessionMessageInfo[] }) {
|
|
|
<Show when={visible() && shortcut()}>
|
|
|
{(value) => (
|
|
|
<box marginTop={1} paddingLeft={3} flexShrink={0}>
|
|
|
- <text fg={themeV2.text.subdued()}>
|
|
|
- Press <span style={{ fg: themeV2.text() }}>{value()}</span> to move running work to the background
|
|
|
+ <text fg={themeV2.text.subdued}>
|
|
|
+ Press <span style={{ fg: themeV2.text.default }}>{value()}</span> to move running work to the background
|
|
|
</text>
|
|
|
</box>
|
|
|
)}
|
|
|
@@ -1209,13 +1209,13 @@ function SessionReasoningGroupView(props: {
|
|
|
icon={expanded() ? "-" : "+"}
|
|
|
color={
|
|
|
!props.completed
|
|
|
- ? themeV2.text()
|
|
|
+ ? themeV2.text.default
|
|
|
: hover() || expanded()
|
|
|
- ? themeV2.text.feedback.warning()
|
|
|
+ ? themeV2.text.feedback.warning.default
|
|
|
: RGBA.fromValues(
|
|
|
- themeV2.text.feedback.warning().r,
|
|
|
- themeV2.text.feedback.warning().g,
|
|
|
- themeV2.text.feedback.warning().b,
|
|
|
+ themeV2.text.feedback.warning.default.r,
|
|
|
+ themeV2.text.feedback.warning.default.g,
|
|
|
+ themeV2.text.feedback.warning.default.b,
|
|
|
0.6,
|
|
|
)
|
|
|
}
|
|
|
@@ -1258,7 +1258,7 @@ function SessionReasoningGroupView(props: {
|
|
|
<box
|
|
|
border={["left"]}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.raise(themeV2.background.surface.offset())}
|
|
|
+ borderColor={themeV2.raise(themeV2.background.surface.offset)}
|
|
|
paddingLeft={1}
|
|
|
>
|
|
|
<code
|
|
|
@@ -1268,7 +1268,7 @@ function SessionReasoningGroupView(props: {
|
|
|
syntaxStyle={syntax()}
|
|
|
content={content()}
|
|
|
conceal={ctx.markdownMode() === "rendered"}
|
|
|
- fg={themeV2.text.subdued()}
|
|
|
+ fg={themeV2.text.subdued}
|
|
|
/>
|
|
|
</box>
|
|
|
</box>
|
|
|
@@ -1326,7 +1326,7 @@ function SessionGroupView(props: {
|
|
|
<Show when={grouped().length > 0}>
|
|
|
<InlineToolRow
|
|
|
icon={props.completed ? "→" : "✱"}
|
|
|
- color={hover() ? themeV2.text() : themeV2.text.subdued()}
|
|
|
+ color={hover() ? themeV2.text.default : themeV2.text.subdued}
|
|
|
complete={props.completed}
|
|
|
pending={label()}
|
|
|
spinner={!props.completed}
|
|
|
@@ -1372,25 +1372,25 @@ function AssistantFooter(props: { message: SessionMessageAssistant }) {
|
|
|
paddingTop={1}
|
|
|
paddingBottom={1}
|
|
|
paddingLeft={2}
|
|
|
- backgroundColor={themeV2.background()}
|
|
|
+ backgroundColor={themeV2.background.default}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.text.feedback.error()}
|
|
|
+ borderColor={themeV2.text.feedback.error.default}
|
|
|
>
|
|
|
- <text fg={themeV2.text.subdued()}>{errorMessage(props.message.error)}</text>
|
|
|
+ <text fg={themeV2.text.subdued}>{errorMessage(props.message.error)}</text>
|
|
|
</box>
|
|
|
</Show>
|
|
|
<AssistantRetry retry={props.message.retry} />
|
|
|
<box paddingLeft={3} marginTop={props.message.error && !interrupted() ? 1 : 0}>
|
|
|
<text>
|
|
|
- <span style={{ fg: props.message.error ? themeV2.text.subdued() : local.agent.color(props.message.agent) }}>
|
|
|
+ <span style={{ fg: props.message.error ? themeV2.text.subdued : local.agent.color(props.message.agent) }}>
|
|
|
{Locale.titlecase(props.message.agent)}
|
|
|
</span>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}> · {model()}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}> · {model()}</span>
|
|
|
<Show when={duration()}>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}> · {Locale.duration(duration())}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}> · {Locale.duration(duration())}</span>
|
|
|
</Show>
|
|
|
<Show when={interrupted()}>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}> · interrupted</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}> · interrupted</span>
|
|
|
</Show>
|
|
|
</text>
|
|
|
</box>
|
|
|
@@ -1409,7 +1409,7 @@ function SessionSwitchMessageV2(props: { message: SessionMessageInfo }) {
|
|
|
}
|
|
|
return (
|
|
|
<box paddingLeft={3}>
|
|
|
- <text fg={themeV2.text.subdued()}>{text()}</text>
|
|
|
+ <text fg={themeV2.text.subdued}>{text()}</text>
|
|
|
</box>
|
|
|
)
|
|
|
}
|
|
|
@@ -1436,15 +1436,15 @@ function SessionNoticeMessageV2(props: { message: SessionMessageInfo }) {
|
|
|
const heading = () => `${state() === "completed" ? "↳" : "!"} ${actor()} ${status()}`
|
|
|
const suffix = () => Locale.truncateWidth(` · ${description()}`, Math.max(0, ctx.width - 3 - stringWidth(heading())))
|
|
|
const color = () => {
|
|
|
- if (state() === "error") return themeV2.text.feedback.error()
|
|
|
- if (state() === "cancelled") return themeV2.text.feedback.warning()
|
|
|
- return themeV2.text.feedback.info()
|
|
|
+ if (state() === "error") return themeV2.text.feedback.error.default
|
|
|
+ if (state() === "cancelled") return themeV2.text.feedback.warning.default
|
|
|
+ return themeV2.text.feedback.info.default
|
|
|
}
|
|
|
return (
|
|
|
<Show
|
|
|
when={completion()}
|
|
|
fallback={
|
|
|
- <InlineToolRow icon="◈" color={themeV2.text.subdued()} pending="Notice" complete={true}>
|
|
|
+ <InlineToolRow icon="◈" color={themeV2.text.subdued} pending="Notice" complete={true}>
|
|
|
{text()}
|
|
|
</InlineToolRow>
|
|
|
}
|
|
|
@@ -1452,7 +1452,7 @@ function SessionNoticeMessageV2(props: { message: SessionMessageInfo }) {
|
|
|
<box marginLeft={3}>
|
|
|
<text wrapMode="none">
|
|
|
<span style={{ fg: color() }}>{heading()}</span>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}>{suffix()}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}>{suffix()}</span>
|
|
|
</text>
|
|
|
</box>
|
|
|
</Show>
|
|
|
@@ -1462,7 +1462,7 @@ function SessionNoticeMessageV2(props: { message: SessionMessageInfo }) {
|
|
|
function SessionSkillMessage(props: { message: Extract<SessionMessageInfo, { type: "skill" }> }) {
|
|
|
const { themeV2 } = useTheme()
|
|
|
return (
|
|
|
- <InlineToolRow icon="→" color={themeV2.text.subdued()} pending="Skill" complete={true}>
|
|
|
+ <InlineToolRow icon="→" color={themeV2.text.subdued} pending="Skill" complete={true}>
|
|
|
Skill {props.message.name}
|
|
|
</InlineToolRow>
|
|
|
)
|
|
|
@@ -1476,7 +1476,8 @@ function CompactionMessage(props: { message: Extract<SessionMessageInfo, { type:
|
|
|
const text = () =>
|
|
|
props.message.status === "failed" ? (cancelled() ? "" : props.message.error.message) : props.message.summary
|
|
|
const content = createMemo(() => text().trim())
|
|
|
- const color = () => (status() === "failed" && !cancelled() ? themeV2.text.feedback.error() : themeV2.text.subdued())
|
|
|
+ const color = () =>
|
|
|
+ status() === "failed" && !cancelled() ? themeV2.text.feedback.error.default : themeV2.text.subdued
|
|
|
return (
|
|
|
<box>
|
|
|
<box flexDirection="row" alignItems="center">
|
|
|
@@ -1508,8 +1509,8 @@ function CompactionMessage(props: { message: Extract<SessionMessageInfo, { type:
|
|
|
content={content()}
|
|
|
tableOptions={{ style: "grid" }}
|
|
|
conceal={ctx.markdownMode() === "rendered"}
|
|
|
- fg={themeV2.markdown()}
|
|
|
- bg={themeV2.background()}
|
|
|
+ fg={themeV2.markdown.text}
|
|
|
+ bg={themeV2.background.default}
|
|
|
/>
|
|
|
</box>
|
|
|
</Show>
|
|
|
@@ -1521,12 +1522,12 @@ function CompactionQueued() {
|
|
|
const { themeV2 } = useTheme()
|
|
|
return (
|
|
|
<box flexDirection="row" alignItems="center">
|
|
|
- <box border={["top"]} borderColor={themeV2.border()} flexGrow={1} />
|
|
|
+ <box border={["top"]} borderColor={themeV2.border.default} flexGrow={1} />
|
|
|
<box flexDirection="row" gap={1} paddingLeft={1} paddingRight={1}>
|
|
|
- <text fg={themeV2.text.subdued()}>◇</text>
|
|
|
- <text fg={themeV2.text.subdued()}>Compaction queued</text>
|
|
|
+ <text fg={themeV2.text.subdued}>◇</text>
|
|
|
+ <text fg={themeV2.text.subdued}>Compaction queued</text>
|
|
|
</box>
|
|
|
- <box border={["top"]} borderColor={themeV2.border()} flexGrow={1} />
|
|
|
+ <box border={["top"]} borderColor={themeV2.border.default} flexGrow={1} />
|
|
|
</box>
|
|
|
)
|
|
|
}
|
|
|
@@ -1572,15 +1573,15 @@ function RevertMessage(props: {
|
|
|
marginTop={1}
|
|
|
border={["left"]}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.background()}
|
|
|
+ borderColor={themeV2.background.default}
|
|
|
>
|
|
|
<box
|
|
|
paddingTop={1}
|
|
|
paddingBottom={1}
|
|
|
paddingLeft={2}
|
|
|
- backgroundColor={hover() ? themeV2.raise(themeV2.background()) : themeV2.background()}
|
|
|
+ backgroundColor={hover() ? themeV2.raise(themeV2.background.default) : themeV2.background.default}
|
|
|
>
|
|
|
- <text fg={themeV2.text.subdued()}>
|
|
|
+ <text fg={themeV2.text.subdued}>
|
|
|
{props.count} message{props.count === 1 ? "" : "s"} reverted
|
|
|
</text>
|
|
|
<Show when={props.files.length > 0}>
|
|
|
@@ -1588,7 +1589,7 @@ function RevertMessage(props: {
|
|
|
<For each={props.files}>
|
|
|
{(file) => (
|
|
|
<box flexDirection="row" gap={1} flexShrink={0}>
|
|
|
- <text fg={themeV2.text.subdued()}>{statusLabel(file.status)}</text>
|
|
|
+ <text fg={themeV2.text.subdued}>{statusLabel(file.status)}</text>
|
|
|
<FilePath
|
|
|
value={file.file}
|
|
|
maxWidth={Math.max(
|
|
|
@@ -1598,21 +1599,21 @@ function RevertMessage(props: {
|
|
|
(file.additions > 0 ? stringWidth(`+${file.additions}`) + 1 : 0) -
|
|
|
(file.deletions > 0 ? stringWidth(`-${file.deletions}`) + 1 : 0),
|
|
|
)}
|
|
|
- fg={themeV2.text()}
|
|
|
+ fg={themeV2.text.default}
|
|
|
/>
|
|
|
<Show when={file.additions > 0}>
|
|
|
- <text fg={themeV2.diff.text.added()}>+{file.additions}</text>
|
|
|
+ <text fg={themeV2.diff.text.added}>+{file.additions}</text>
|
|
|
</Show>
|
|
|
<Show when={file.deletions > 0}>
|
|
|
- <text fg={themeV2.diff.text.removed()}>-{file.deletions}</text>
|
|
|
+ <text fg={themeV2.diff.text.removed}>-{file.deletions}</text>
|
|
|
</Show>
|
|
|
</box>
|
|
|
)}
|
|
|
</For>
|
|
|
</box>
|
|
|
</Show>
|
|
|
- <text fg={themeV2.text.subdued()}>
|
|
|
- <span style={{ fg: themeV2.text() }}>{redoKey()}</span> or /redo to restore
|
|
|
+ <text fg={themeV2.text.subdued}>
|
|
|
+ <span style={{ fg: themeV2.text.default }}>{redoKey()}</span> or /redo to restore
|
|
|
</text>
|
|
|
</box>
|
|
|
</box>
|
|
|
@@ -1630,13 +1631,13 @@ function ShellMessage(props: { message: Extract<SessionMessageInfo, { type: "she
|
|
|
paddingBottom={1}
|
|
|
paddingLeft={2}
|
|
|
gap={1}
|
|
|
- backgroundColor={themeV2.background()}
|
|
|
+ backgroundColor={themeV2.background.default}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.background()}
|
|
|
+ borderColor={themeV2.background.default}
|
|
|
>
|
|
|
- <text fg={themeV2.text()}>$ {props.message.command}</text>
|
|
|
+ <text fg={themeV2.text.default}>$ {props.message.command}</text>
|
|
|
<Show when={output()}>
|
|
|
- <text fg={themeV2.text.subdued()}>{output()}</text>
|
|
|
+ <text fg={themeV2.text.subdued}>{output()}</text>
|
|
|
</Show>
|
|
|
</box>
|
|
|
)
|
|
|
@@ -1661,7 +1662,7 @@ function UserMessage(props: { message: SessionMessageUser }) {
|
|
|
<Show when={props.message.text.trim() || files().length}>
|
|
|
<box
|
|
|
border={["left"]}
|
|
|
- borderColor={queued() ? themeV2.border() : color()}
|
|
|
+ borderColor={queued() ? themeV2.border.default : color()}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
>
|
|
|
<box
|
|
|
@@ -1684,27 +1685,27 @@ function UserMessage(props: { message: SessionMessageUser }) {
|
|
|
paddingTop={1}
|
|
|
paddingBottom={1}
|
|
|
paddingLeft={2}
|
|
|
- backgroundColor={hover() ? themeV2.raise(themeV2.background()) : themeV2.background()}
|
|
|
+ backgroundColor={hover() ? themeV2.raise(themeV2.background.default) : themeV2.background.default}
|
|
|
flexShrink={0}
|
|
|
>
|
|
|
- <text fg={themeV2.text()}>{props.message.text}</text>
|
|
|
+ <text fg={themeV2.text.default}>{props.message.text}</text>
|
|
|
<Show when={files().length}>
|
|
|
<box flexDirection="row" paddingTop={1} gap={1} flexWrap="wrap">
|
|
|
<For each={files()}>
|
|
|
{(file) => {
|
|
|
const label = file.mime === "application/x-directory" ? "dir" : "file"
|
|
|
return (
|
|
|
- <text fg={themeV2.text()}>
|
|
|
+ <text fg={themeV2.text.default}>
|
|
|
<span
|
|
|
style={{
|
|
|
- bg: themeV2.hue.accent(mode() === "light" ? 700 : 200),
|
|
|
- fg: themeV2.background(),
|
|
|
+ bg: themeV2.hue.accent[mode() === "light" ? 700 : 200],
|
|
|
+ fg: themeV2.background.default,
|
|
|
bold: true,
|
|
|
}}
|
|
|
>
|
|
|
{` ${label} `}
|
|
|
</span>
|
|
|
- <span style={{ bg: themeV2.raise(themeV2.background()), fg: themeV2.text.subdued() }}>
|
|
|
+ <span style={{ bg: themeV2.raise(themeV2.background.default), fg: themeV2.text.subdued }}>
|
|
|
{" "}
|
|
|
{file.name ?? (file.source.type === "uri" ? file.source.uri : "attachment")}{" "}
|
|
|
</span>
|
|
|
@@ -1809,11 +1810,11 @@ function AssistantMessage(props: { message: SessionMessageAssistant; last: boole
|
|
|
paddingTop={1}
|
|
|
paddingBottom={1}
|
|
|
paddingLeft={2}
|
|
|
- backgroundColor={themeV2.background()}
|
|
|
+ backgroundColor={themeV2.background.default}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.text.feedback.error()}
|
|
|
+ borderColor={themeV2.text.feedback.error.default}
|
|
|
>
|
|
|
- <text fg={themeV2.text.subdued()}>{errorMessage(props.message.error)}</text>
|
|
|
+ <text fg={themeV2.text.subdued}>{errorMessage(props.message.error)}</text>
|
|
|
</box>
|
|
|
</Show>
|
|
|
<AssistantRetry retry={props.message.retry} />
|
|
|
@@ -1821,14 +1822,12 @@ function AssistantMessage(props: { message: SessionMessageAssistant; last: boole
|
|
|
<Match when={props.last || final() || props.message.error}>
|
|
|
<box paddingLeft={3}>
|
|
|
<text>
|
|
|
- <span
|
|
|
- style={{ fg: props.message.error ? themeV2.text.subdued() : local.agent.color(props.message.agent) }}
|
|
|
- >
|
|
|
+ <span style={{ fg: props.message.error ? themeV2.text.subdued : local.agent.color(props.message.agent) }}>
|
|
|
{Locale.titlecase(props.message.agent)}
|
|
|
</span>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}> · {model()}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}> · {model()}</span>
|
|
|
<Show when={duration()}>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}> · {Locale.duration(duration())}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}> · {Locale.duration(duration())}</span>
|
|
|
</Show>
|
|
|
</text>
|
|
|
</box>
|
|
|
@@ -1844,7 +1843,7 @@ function AssistantRetry(props: { retry: SessionMessageAssistant["retry"] }) {
|
|
|
<Show when={props.retry}>
|
|
|
{(retry) => (
|
|
|
<box paddingLeft={3} marginTop={1}>
|
|
|
- <text fg={themeV2.text.subdued()}>
|
|
|
+ <text fg={themeV2.text.subdued}>
|
|
|
Retry attempt {retry().attempt} scheduled: {retry().error.message} [{retry().error.type}]
|
|
|
</text>
|
|
|
</box>
|
|
|
@@ -1867,7 +1866,7 @@ function ExplorationSummary(props: { parts: SessionMessageAssistantTool[]; activ
|
|
|
<box flexDirection="column">
|
|
|
<InlineToolRow
|
|
|
icon="✱"
|
|
|
- color={themeV2.text.subdued()}
|
|
|
+ color={themeV2.text.subdued}
|
|
|
complete={!props.active}
|
|
|
pending="Exploring"
|
|
|
spinner={props.active}
|
|
|
@@ -1877,7 +1876,7 @@ function ExplorationSummary(props: { parts: SessionMessageAssistantTool[]; activ
|
|
|
<For each={props.parts}>
|
|
|
{(part, index) => (
|
|
|
<box paddingLeft={5}>
|
|
|
- <text fg={part.state.status === "error" ? themeV2.text.feedback.error() : themeV2.text.subdued()}>
|
|
|
+ <text fg={part.state.status === "error" ? themeV2.text.feedback.error.default : themeV2.text.subdued}>
|
|
|
{index() === props.parts.length - 1 ? "└" : "├"} {label(part)}
|
|
|
</text>
|
|
|
</box>
|
|
|
@@ -1922,7 +1921,7 @@ function ReasoningPart(props: {
|
|
|
<box
|
|
|
border={!inMinimal() || expanded() ? ["left"] : undefined}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.raise(themeV2.background())}
|
|
|
+ borderColor={themeV2.raise(themeV2.background.default)}
|
|
|
paddingLeft={!inMinimal() || expanded() ? 1 : 0}
|
|
|
>
|
|
|
<box onMouseUp={toggle}>
|
|
|
@@ -1940,7 +1939,7 @@ function ReasoningPart(props: {
|
|
|
<box
|
|
|
border={["left"]}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.raise(themeV2.background())}
|
|
|
+ borderColor={themeV2.raise(themeV2.background.default)}
|
|
|
paddingLeft={inMinimal() ? 3 : 1}
|
|
|
>
|
|
|
<code
|
|
|
@@ -1950,7 +1949,7 @@ function ReasoningPart(props: {
|
|
|
syntaxStyle={syntax()}
|
|
|
content={content()}
|
|
|
conceal={ctx.markdownMode() === "rendered"}
|
|
|
- fg={themeV2.text.subdued()}
|
|
|
+ fg={themeV2.text.subdued}
|
|
|
/>
|
|
|
</box>
|
|
|
</box>
|
|
|
@@ -1976,12 +1975,12 @@ function ReasoningHeader(props: {
|
|
|
const fg = () =>
|
|
|
props.open
|
|
|
? RGBA.fromValues(
|
|
|
- themeV2.text.feedback.warning().r,
|
|
|
- themeV2.text.feedback.warning().g,
|
|
|
- themeV2.text.feedback.warning().b,
|
|
|
+ themeV2.text.feedback.warning.default.r,
|
|
|
+ themeV2.text.feedback.warning.default.g,
|
|
|
+ themeV2.text.feedback.warning.default.b,
|
|
|
0.6,
|
|
|
)
|
|
|
- : themeV2.text.feedback.warning()
|
|
|
+ : themeV2.text.feedback.warning.default
|
|
|
|
|
|
return (
|
|
|
<Switch>
|
|
|
@@ -2027,8 +2026,8 @@ function TextPart(props: { last: boolean; part: SessionMessageAssistantText }) {
|
|
|
content={props.part.text.trim()}
|
|
|
tableOptions={{ style: "grid" }}
|
|
|
conceal={ctx.markdownMode() === "rendered"}
|
|
|
- fg={themeV2.markdown()}
|
|
|
- bg={themeV2.background()}
|
|
|
+ fg={themeV2.markdown.text}
|
|
|
+ bg={themeV2.background.default}
|
|
|
/>
|
|
|
</box>
|
|
|
</Show>
|
|
|
@@ -2135,7 +2134,7 @@ function GenericTool(props: ToolProps) {
|
|
|
<Show when={Object.keys(props.input).length > 0}>
|
|
|
<box gap={1}>
|
|
|
<text>
|
|
|
- <span style={{ bg: themeV2.raise(themeV2.background()), fg: themeV2.text.subdued() }}> Input </span>
|
|
|
+ <span style={{ bg: themeV2.raise(themeV2.background.default), fg: themeV2.text.subdued }}> Input </span>
|
|
|
</text>
|
|
|
<box paddingLeft={1}>
|
|
|
<code
|
|
|
@@ -2144,7 +2143,7 @@ function GenericTool(props: ToolProps) {
|
|
|
syntaxStyle={syntax()}
|
|
|
conceal={false}
|
|
|
drawUnstyledText={false}
|
|
|
- fg={themeV2.text()}
|
|
|
+ fg={themeV2.text.default}
|
|
|
/>
|
|
|
</box>
|
|
|
</box>
|
|
|
@@ -2153,10 +2152,13 @@ function GenericTool(props: ToolProps) {
|
|
|
{(value) => (
|
|
|
<box gap={1}>
|
|
|
<text>
|
|
|
- <span style={{ bg: themeV2.raise(themeV2.background()), fg: themeV2.text.subdued() }}> Output </span>
|
|
|
+ <span style={{ bg: themeV2.raise(themeV2.background.default), fg: themeV2.text.subdued }}>
|
|
|
+ {" "}
|
|
|
+ Output{" "}
|
|
|
+ </span>
|
|
|
</text>
|
|
|
<box paddingLeft={1}>
|
|
|
- <text fg={themeV2.text()} wrapMode="word">
|
|
|
+ <text fg={themeV2.text.default} wrapMode="word">
|
|
|
{value()}
|
|
|
</text>
|
|
|
</box>
|
|
|
@@ -2208,10 +2210,10 @@ function InlineTool(props: {
|
|
|
const clickable = createMemo(() => Boolean(props.onClick || failed()))
|
|
|
const fg = createMemo(() => {
|
|
|
if (props.color) return props.color
|
|
|
- if (permission()) return themeV2.text.feedback.warning()
|
|
|
- if (failed()) return themeV2.text.feedback.error()
|
|
|
- if (hover() && props.onClick) return themeV2.text()
|
|
|
- return themeV2.text.subdued()
|
|
|
+ if (permission()) return themeV2.text.feedback.warning.default
|
|
|
+ if (failed()) return themeV2.text.feedback.error.default
|
|
|
+ if (hover() && props.onClick) return themeV2.text.default
|
|
|
+ return themeV2.text.subdued
|
|
|
})
|
|
|
|
|
|
return (
|
|
|
@@ -2219,7 +2221,7 @@ function InlineTool(props: {
|
|
|
icon={props.icon}
|
|
|
iconColor={props.iconColor}
|
|
|
color={fg()}
|
|
|
- errorColor={themeV2.text.feedback.error()}
|
|
|
+ errorColor={themeV2.text.feedback.error.default}
|
|
|
failed={failed()}
|
|
|
denied={Boolean(denied())}
|
|
|
error={error()}
|
|
|
@@ -2343,7 +2345,7 @@ function InlineToolLabel(props: { color?: RGBA; denied?: boolean; status: JSX.El
|
|
|
function StatusBadge(props: { children: string }) {
|
|
|
const { themeV2 } = useTheme()
|
|
|
return (
|
|
|
- <text flexShrink={0} bg={themeV2.raise(themeV2.background())} fg={themeV2.text.subdued()}>
|
|
|
+ <text flexShrink={0} bg={themeV2.raise(themeV2.background.default)} fg={themeV2.text.subdued}>
|
|
|
{" "}
|
|
|
{props.children}{" "}
|
|
|
</text>
|
|
|
@@ -2376,9 +2378,9 @@ function BlockTool(props: {
|
|
|
paddingBottom={1}
|
|
|
paddingLeft={2}
|
|
|
gap={1}
|
|
|
- backgroundColor={hover() ? themeV2.raise(themeV2.background()) : themeV2.background()}
|
|
|
+ backgroundColor={hover() ? themeV2.raise(themeV2.background.default) : themeV2.background.default}
|
|
|
customBorderChars={SplitBorder.customBorderChars}
|
|
|
- borderColor={themeV2.background()}
|
|
|
+ borderColor={themeV2.background.default}
|
|
|
onMouseOver={() => props.onClick && setHover(true)}
|
|
|
onMouseOut={() => setHover(false)}
|
|
|
onMouseUp={() => {
|
|
|
@@ -2394,10 +2396,12 @@ function BlockTool(props: {
|
|
|
<Show
|
|
|
when={props.spinner}
|
|
|
fallback={
|
|
|
- <text fg={permission() ? themeV2.text.feedback.warning() : themeV2.text.subdued()}>{title()}</text>
|
|
|
+ <text fg={permission() ? themeV2.text.feedback.warning.default : themeV2.text.subdued}>
|
|
|
+ {title()}
|
|
|
+ </text>
|
|
|
}
|
|
|
>
|
|
|
- <Spinner color={permission() ? themeV2.text.feedback.warning() : themeV2.text.subdued()}>
|
|
|
+ <Spinner color={permission() ? themeV2.text.feedback.warning.default : themeV2.text.subdued}>
|
|
|
{title().replace(/^# /, "")}
|
|
|
</Spinner>
|
|
|
</Show>
|
|
|
@@ -2410,26 +2414,26 @@ function BlockTool(props: {
|
|
|
<Show
|
|
|
when={props.spinner}
|
|
|
fallback={
|
|
|
- <text flexShrink={0} fg={permission() ? themeV2.text.feedback.warning() : themeV2.text.subdued()}>
|
|
|
+ <text flexShrink={0} fg={permission() ? themeV2.text.feedback.warning.default : themeV2.text.subdued}>
|
|
|
{path().label}
|
|
|
</text>
|
|
|
}
|
|
|
>
|
|
|
- <Spinner color={permission() ? themeV2.text.feedback.warning() : themeV2.text.subdued()}>
|
|
|
+ <Spinner color={permission() ? themeV2.text.feedback.warning.default : themeV2.text.subdued}>
|
|
|
{path().label.replace(/^# /, "")}
|
|
|
</Spinner>
|
|
|
</Show>
|
|
|
<FilePath
|
|
|
value={path().value}
|
|
|
maxWidth={Math.max(2, ctx.width - 4 - stringWidth(path().label) - (props.spinner ? 2 : 0))}
|
|
|
- fg={permission() ? themeV2.text.feedback.warning() : themeV2.text.subdued()}
|
|
|
+ fg={permission() ? themeV2.text.feedback.warning.default : themeV2.text.subdued}
|
|
|
/>
|
|
|
</box>
|
|
|
)}
|
|
|
</Show>
|
|
|
{props.children}
|
|
|
<Show when={error()}>
|
|
|
- <text fg={themeV2.text.feedback.error()}>{error()}</text>
|
|
|
+ <text fg={themeV2.text.feedback.error.default}>{error()}</text>
|
|
|
</Show>
|
|
|
</box>
|
|
|
)
|
|
|
@@ -2444,7 +2448,7 @@ function Shell(props: ToolProps) {
|
|
|
const request = data.session.permission.list(ctx.sessionID)?.[0]
|
|
|
return request?.source?.type === "tool" && request.source.callID === props.part.id
|
|
|
})
|
|
|
- const color = createMemo(() => (permission() ? themeV2.text.feedback.warning() : themeV2.text()))
|
|
|
+ const color = createMemo(() => (permission() ? themeV2.text.feedback.warning.default : themeV2.text.default))
|
|
|
const shellID = createMemo(() => stringValue(props.metadata.shellID))
|
|
|
const backgroundRunning = createMemo(() => {
|
|
|
const id = shellID()
|
|
|
@@ -2506,7 +2510,7 @@ function Shell(props: ToolProps) {
|
|
|
isRunning() || props.part.state.status === "streaming" ? (
|
|
|
<Spinner color={color()}>Writing command...</Spinner>
|
|
|
) : (
|
|
|
- <text fg={themeV2.text.subdued()}>Writing command...</text>
|
|
|
+ <text fg={themeV2.text.subdued}>Writing command...</text>
|
|
|
)
|
|
|
}
|
|
|
>
|
|
|
@@ -2514,14 +2518,14 @@ function Shell(props: ToolProps) {
|
|
|
when={isRunning()}
|
|
|
fallback={
|
|
|
<text>
|
|
|
- <span style={{ fg: themeV2.text() }}>{limited().slice(0, input().length)}</span>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}>{limited().slice(input().length)}</span>
|
|
|
+ <span style={{ fg: themeV2.text.default }}>{limited().slice(0, input().length)}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}>{limited().slice(input().length)}</span>
|
|
|
</text>
|
|
|
}
|
|
|
>
|
|
|
<Spinner color={color()}>
|
|
|
- <span style={{ fg: themeV2.text() }}>{limited().slice(0, input().length)}</span>
|
|
|
- <span style={{ fg: themeV2.text.subdued() }}>{limited().slice(input().length)}</span>
|
|
|
+ <span style={{ fg: themeV2.text.default }}>{limited().slice(0, input().length)}</span>
|
|
|
+ <span style={{ fg: themeV2.text.subdued }}>{limited().slice(input().length)}</span>
|
|
|
</Spinner>
|
|
|
</Show>
|
|
|
</Show>
|
|
|
@@ -2547,10 +2551,10 @@ function Write(props: ToolProps) {
|
|
|
path={{ label: "# Wrote", value: pathFormatter.format(stringValue(props.input.path)) }}
|
|
|
part={props.part}
|
|
|
>
|
|
|
- <line_number fg={themeV2.text.subdued()} minWidth={3} paddingRight={1}>
|
|
|
+ <line_number fg={themeV2.text.subdued} minWidth={3} paddingRight={1}>
|
|
|
<code
|
|
|
conceal={false}
|
|
|
- fg={themeV2.text()}
|
|
|
+ fg={themeV2.text.default}
|
|
|
filetype={filetype(stringValue(props.input.path))}
|
|
|
syntaxStyle={syntax()}
|
|
|
content={code()}
|
|
|
@@ -2605,7 +2609,7 @@ function Read(props: ToolProps) {
|
|
|
<For each={loaded()}>
|
|
|
{(filepath) => (
|
|
|
<box paddingLeft={3}>
|
|
|
- <text paddingLeft={3} fg={themeV2.text.subdued()}>
|
|
|
+ <text paddingLeft={3} fg={themeV2.text.subdued}>
|
|
|
↳ Loaded {pathFormatter.format(filepath)}
|
|
|
</text>
|
|
|
</box>
|
|
|
@@ -2724,7 +2728,7 @@ function Execute(props: ToolProps) {
|
|
|
<>
|
|
|
<InlineTool
|
|
|
icon={hasRuntimeError() ? "✗" : props.part.state.status === "completed" ? "✓" : "│"}
|
|
|
- color={hasRuntimeError() ? themeV2.text.feedback.error() : undefined}
|
|
|
+ color={hasRuntimeError() ? themeV2.text.feedback.error.default : undefined}
|
|
|
spinner={isLoading()}
|
|
|
pending="execute"
|
|
|
complete={true}
|
|
|
@@ -2736,7 +2740,7 @@ function Execute(props: ToolProps) {
|
|
|
<box paddingLeft={3}>
|
|
|
<For each={outputPreview().split("\n")}>
|
|
|
{(line, index) => (
|
|
|
- <text paddingLeft={3} fg={themeV2.text.feedback.error()}>
|
|
|
+ <text paddingLeft={3} fg={themeV2.text.feedback.error.default}>
|
|
|
{index() === 0 ? "↳ " : " "}
|
|
|
{line}
|
|
|
</text>
|
|
|
@@ -2778,16 +2782,16 @@ function Edit(props: ToolProps) {
|
|
|
showLineNumbers={true}
|
|
|
width="100%"
|
|
|
wrapMode={ctx.diffWrapMode()}
|
|
|
- fg={themeV2.text()}
|
|
|
- addedBg={themeV2.diff.background.added()}
|
|
|
- removedBg={themeV2.diff.background.removed()}
|
|
|
- contextBg={themeV2.diff.background.context()}
|
|
|
- addedSignColor={themeV2.diff.highlight.added()}
|
|
|
- removedSignColor={themeV2.diff.highlight.removed()}
|
|
|
- lineNumberFg={themeV2.diff.lineNumber.text()}
|
|
|
- lineNumberBg={themeV2.diff.background.context()}
|
|
|
- addedLineNumberBg={themeV2.diff.lineNumber.background.added()}
|
|
|
- removedLineNumberBg={themeV2.diff.lineNumber.background.removed()}
|
|
|
+ fg={themeV2.text.default}
|
|
|
+ addedBg={themeV2.diff.background.added}
|
|
|
+ removedBg={themeV2.diff.background.removed}
|
|
|
+ contextBg={themeV2.diff.background.context}
|
|
|
+ addedSignColor={themeV2.diff.highlight.added}
|
|
|
+ removedSignColor={themeV2.diff.highlight.removed}
|
|
|
+ lineNumberFg={themeV2.diff.lineNumber.text}
|
|
|
+ lineNumberBg={themeV2.diff.background.context}
|
|
|
+ addedLineNumberBg={themeV2.diff.lineNumber.background.added}
|
|
|
+ removedLineNumberBg={themeV2.diff.lineNumber.background.removed}
|
|
|
/>
|
|
|
</box>
|
|
|
<Diagnostics diagnostics={props.metadata.diagnostics} filePath={stringValue(props.input.path) ?? ""} />
|
|
|
@@ -2852,7 +2856,7 @@ function ApplyPatch(props: ToolProps) {
|
|
|
<Show
|
|
|
when={file.type !== "delete"}
|
|
|
fallback={
|
|
|
- <text fg={themeV2.diff.text.removed()}>
|
|
|
+ <text fg={themeV2.diff.text.removed}>
|
|
|
-{file.deletions} line{file.deletions !== 1 ? "s" : ""}
|
|
|
</text>
|
|
|
}
|
|
|
@@ -2866,16 +2870,16 @@ function ApplyPatch(props: ToolProps) {
|
|
|
showLineNumbers={true}
|
|
|
width="100%"
|
|
|
wrapMode={ctx.diffWrapMode()}
|
|
|
- fg={themeV2.text()}
|
|
|
- addedBg={themeV2.diff.background.added()}
|
|
|
- removedBg={themeV2.diff.background.removed()}
|
|
|
- contextBg={themeV2.diff.background.context()}
|
|
|
- addedSignColor={themeV2.diff.highlight.added()}
|
|
|
- removedSignColor={themeV2.diff.highlight.removed()}
|
|
|
- lineNumberFg={themeV2.diff.lineNumber.text()}
|
|
|
- lineNumberBg={themeV2.diff.background.context()}
|
|
|
- addedLineNumberBg={themeV2.diff.lineNumber.background.added()}
|
|
|
- removedLineNumberBg={themeV2.diff.lineNumber.background.removed()}
|
|
|
+ fg={themeV2.text.default}
|
|
|
+ addedBg={themeV2.diff.background.added}
|
|
|
+ removedBg={themeV2.diff.background.removed}
|
|
|
+ contextBg={themeV2.diff.background.context}
|
|
|
+ addedSignColor={themeV2.diff.highlight.added}
|
|
|
+ removedSignColor={themeV2.diff.highlight.removed}
|
|
|
+ lineNumberFg={themeV2.diff.lineNumber.text}
|
|
|
+ lineNumberBg={themeV2.diff.background.context}
|
|
|
+ addedLineNumberBg={themeV2.diff.lineNumber.background.added}
|
|
|
+ removedLineNumberBg={themeV2.diff.lineNumber.background.removed}
|
|
|
/>
|
|
|
</box>
|
|
|
</Show>
|
|
|
@@ -2898,7 +2902,7 @@ function ApplyPatch(props: ToolProps) {
|
|
|
<FilePath
|
|
|
value={file.resource}
|
|
|
maxWidth={Math.max(2, ctx.width - 3)}
|
|
|
- fg={file.type === "delete" ? themeV2.diff.text.removed() : themeV2.text.subdued()}
|
|
|
+ fg={file.type === "delete" ? themeV2.diff.text.removed : themeV2.text.subdued}
|
|
|
/>
|
|
|
</BlockTool>
|
|
|
)}
|
|
|
@@ -2945,8 +2949,8 @@ function Question(props: ToolProps) {
|
|
|
<For each={questions()}>
|
|
|
{(q, i) => (
|
|
|
<box flexDirection="column">
|
|
|
- <text fg={themeV2.text.subdued()}>{q.question}</text>
|
|
|
- <text fg={themeV2.text()}>{format(answers()?.[i()])}</text>
|
|
|
+ <text fg={themeV2.text.subdued}>{q.question}</text>
|
|
|
+ <text fg={themeV2.text.default}>{format(answers()?.[i()])}</text>
|
|
|
</box>
|
|
|
)}
|
|
|
</For>
|
|
|
@@ -2987,7 +2991,7 @@ function Diagnostics(props: { diagnostics: unknown; filePath: string }) {
|
|
|
<box>
|
|
|
<For each={errors()}>
|
|
|
{(diagnostic) => (
|
|
|
- <text fg={themeV2.text.feedback.error()}>
|
|
|
+ <text fg={themeV2.text.feedback.error.default}>
|
|
|
Error [{diagnostic.range.start.line + 1}:{diagnostic.range.start.character + 1}] {diagnostic.message}
|
|
|
</text>
|
|
|
)}
|