|
|
@@ -36,7 +36,6 @@ import { useToast } from "../../ui/toast"
|
|
|
import { useKV } from "../../context/kv"
|
|
|
import { useTextareaKeybindings } from "../textarea-keybindings"
|
|
|
import { DialogSkill } from "../dialog-skill"
|
|
|
-import { CONSOLE_MANAGED_ICON, consoleManagedProviderLabel } from "@tui/util/provider-origin"
|
|
|
|
|
|
export type PromptProps = {
|
|
|
sessionID?: string
|
|
|
@@ -96,15 +95,8 @@ export function Prompt(props: PromptProps) {
|
|
|
const list = createMemo(() => props.placeholders?.normal ?? [])
|
|
|
const shell = createMemo(() => props.placeholders?.shell ?? [])
|
|
|
const [auto, setAuto] = createSignal<AutocompleteRef>()
|
|
|
- const activeOrgName = createMemo(() => sync.data.console_state.activeOrgName)
|
|
|
- const canSwitchOrgs = createMemo(() => sync.data.console_state.switchableOrgCount > 1)
|
|
|
- const currentProviderLabel = createMemo(() => {
|
|
|
- const current = local.model.current()
|
|
|
- const provider = local.model.parsed().provider
|
|
|
- if (!current) return provider
|
|
|
- return consoleManagedProviderLabel(sync.data.console_state.consoleManagedProviders, current.providerID, provider)
|
|
|
- })
|
|
|
- const hasRightContent = createMemo(() => Boolean(props.right || activeOrgName()))
|
|
|
+ const currentProviderLabel = createMemo(() => local.model.parsed().provider)
|
|
|
+ const hasRightContent = createMemo(() => Boolean(props.right))
|
|
|
|
|
|
function promptModelWarning() {
|
|
|
toast.show({
|
|
|
@@ -1120,17 +1112,6 @@ export function Prompt(props: PromptProps) {
|
|
|
<Show when={hasRightContent()}>
|
|
|
<box flexDirection="row" gap={1} alignItems="center">
|
|
|
{props.right}
|
|
|
- <Show when={activeOrgName()}>
|
|
|
- <text
|
|
|
- fg={theme.textMuted}
|
|
|
- onMouseUp={() => {
|
|
|
- if (!canSwitchOrgs()) return
|
|
|
- command.trigger("console.org.switch")
|
|
|
- }}
|
|
|
- >
|
|
|
- {`${CONSOLE_MANAGED_ICON} ${activeOrgName()}`}
|
|
|
- </text>
|
|
|
- </Show>
|
|
|
</box>
|
|
|
</Show>
|
|
|
</box>
|
|
|
@@ -1162,7 +1143,7 @@ export function Prompt(props: PromptProps) {
|
|
|
}
|
|
|
/>
|
|
|
</box>
|
|
|
- <box flexDirection="row" justifyContent="space-between">
|
|
|
+ <box width="100%" flexDirection="row" justifyContent="space-between">
|
|
|
<Show when={status().type !== "idle"} fallback={props.hint ?? <text />}>
|
|
|
<box
|
|
|
flexDirection="row"
|