refactor: remove unused internal code and styles
This commit is contained in:
1 parent
6b90e400e4
commit
4497f7ef24
8 files changed
+2
-35
No files matched your search
@@ -178,10 +178,6 @@ class ProviderSpec:
|
|||||||
extra_body=extra_body,
|
extra_body=extra_body,
|
||||||
)
|
)
|
||||||
|
|
||||||
@property
|
|
||||||
def model_api_configurable(self) -> bool:
|
|
||||||
return len(self.request_apis) > 1
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def provider_api_configurable(self) -> bool:
|
def provider_api_configurable(self) -> bool:
|
||||||
return self.name == "openai" or (
|
return self.name == "openai" or (
|
||||||
|
|||||||
@@ -58,10 +58,6 @@ class TestAtomicSave:
|
|||||||
lambda _length: "save-failure",
|
lambda _length: "save-failure",
|
||||||
)
|
)
|
||||||
|
|
||||||
class BadMessage:
|
|
||||||
def __init__(self, data):
|
|
||||||
self.data = data
|
|
||||||
|
|
||||||
original_dumps = json.dumps
|
original_dumps = json.dumps
|
||||||
|
|
||||||
def failing_dumps(obj, **kwargs):
|
def failing_dumps(obj, **kwargs):
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ export const TERMINAL: Palette = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function syntaxStyle(palette: Palette): SyntaxStyle {
|
function syntaxStyle(palette: Palette): SyntaxStyle {
|
||||||
const color = (value: ColorInput) => {
|
const color = (value: ColorInput) => {
|
||||||
const parsed = parseColor(value)
|
const parsed = parseColor(value)
|
||||||
return { fg: parsed }
|
return { fg: parsed }
|
||||||
|
|||||||
@@ -18,16 +18,13 @@ export {
|
|||||||
export { NanobotClient } from "./nanobot-client"
|
export { NanobotClient } from "./nanobot-client"
|
||||||
export type {
|
export type {
|
||||||
ApiReauthenticator,
|
ApiReauthenticator,
|
||||||
ClientOptions,
|
|
||||||
ConnectionStatus,
|
ConnectionStatus,
|
||||||
ConnectionStatusInfo,
|
ConnectionStatusInfo,
|
||||||
ContextCompaction,
|
ContextCompaction,
|
||||||
FileEditEvent,
|
FileEditEvent,
|
||||||
GatewayApiConnection,
|
GatewayApiConnection,
|
||||||
GatewayConnection,
|
GatewayConnection,
|
||||||
GatewayHealthStatus,
|
|
||||||
HistoryMessage,
|
HistoryMessage,
|
||||||
HistorySnapshot,
|
|
||||||
InboundEvent,
|
InboundEvent,
|
||||||
MediaAttachment,
|
MediaAttachment,
|
||||||
MentionCandidate,
|
MentionCandidate,
|
||||||
@@ -35,7 +32,6 @@ export type {
|
|||||||
OutboundMedia,
|
OutboundMedia,
|
||||||
RecoveryState,
|
RecoveryState,
|
||||||
RetryStatus,
|
RetryStatus,
|
||||||
RuntimeControls,
|
|
||||||
SessionContextSnapshot,
|
SessionContextSnapshot,
|
||||||
SessionSummary,
|
SessionSummary,
|
||||||
SessionUsageSnapshot,
|
SessionUsageSnapshot,
|
||||||
|
|||||||
@@ -54,7 +54,6 @@ import {
|
|||||||
type ProviderAdvancedField,
|
type ProviderAdvancedField,
|
||||||
type ProviderForm,
|
type ProviderForm,
|
||||||
} from "@/components/settings/models/providerForm";
|
} from "@/components/settings/models/providerForm";
|
||||||
export { CUSTOM_PROVIDER_CREATION_KEY, providerFormFromRow } from "@/components/settings/models/providerForm";
|
|
||||||
export type { CustomProviderDraft, ProviderForm } from "@/components/settings/models/providerForm";
|
export type { CustomProviderDraft, ProviderForm } from "@/components/settings/models/providerForm";
|
||||||
import { useMediaQuery } from "@/hooks/useMediaQuery";
|
import { useMediaQuery } from "@/hooks/useMediaQuery";
|
||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|||||||
@@ -24,7 +24,6 @@ import type { ProviderModelsPayload, SettingsPayload } from "@/lib/types";
|
|||||||
import { cn } from "@/lib/utils";
|
import { cn } from "@/lib/utils";
|
||||||
|
|
||||||
export { formatContextWindow, formatModelContextWindow } from "@/lib/model-context-format";
|
export { formatContextWindow, formatModelContextWindow } from "@/lib/model-context-format";
|
||||||
export { PROVIDER_ICONS } from "@/lib/provider-icons";
|
|
||||||
|
|
||||||
const DEFERRED_MODEL_LIST_PROVIDERS = new Set([
|
const DEFERRED_MODEL_LIST_PROVIDERS = new Set([
|
||||||
"aihubmix",
|
"aihubmix",
|
||||||
|
|||||||
@@ -1431,28 +1431,9 @@
|
|||||||
}
|
}
|
||||||
.settings-row:has(> .settings-control > [role="switch"]) > :first-child { grid-column: 1; }
|
.settings-row:has(> .settings-control > [role="switch"]) > :first-child { grid-column: 1; }
|
||||||
.settings-row:has(> .settings-control > [role="switch"]) > :nth-child(2) { grid-column: 2; }
|
.settings-row:has(> .settings-control > [role="switch"]) > :nth-child(2) { grid-column: 2; }
|
||||||
.settings-disclosure > summary {
|
|
||||||
cursor: pointer;
|
|
||||||
padding: 12px var(--settings-inset, 16px);
|
|
||||||
border-radius: var(--radius-control, 12px);
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 500;
|
|
||||||
line-height: 20px;
|
|
||||||
color: hsl(var(--muted-foreground));
|
|
||||||
}
|
|
||||||
.settings-disclosure > summary:hover { color: hsl(var(--foreground)); }
|
|
||||||
.settings-disclosure > summary:focus-visible { outline: 2px solid hsl(var(--ring)); outline-offset: 2px; }
|
|
||||||
.settings-disclosure[open] > summary { margin-block-end: 8px; }
|
|
||||||
|
|
||||||
.settings-list-row, .settings-list-inset { padding-inline: var(--settings-inset, 16px); }
|
.settings-list-row, .settings-list-inset { padding-inline: var(--settings-inset, 16px); }
|
||||||
.settings-list-row { min-block-size: 60px; border-radius: var(--radius-control); }
|
.settings-list-row { min-block-size: 60px; border-radius: var(--radius-control); }
|
||||||
.settings-list-row:focus-visible { outline: none; }
|
.settings-list-row:focus-visible { outline: none; }
|
||||||
.sidebar-action-label:lang(zh) {
|
|
||||||
display: inline-block;
|
|
||||||
min-inline-size: var(--sidebar-label-width, 3em);
|
|
||||||
text-align: justify;
|
|
||||||
text-align-last: justify;
|
|
||||||
}
|
|
||||||
.icon-action[aria-pressed="true"], .icon-action[data-state="open"] {
|
.icon-action[aria-pressed="true"], .icon-action[data-state="open"] {
|
||||||
color: hsl(var(--foreground));
|
color: hsl(var(--foreground));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export const DEFAULT_LOCAL_PREFS: LocalPreferences = {
|
|||||||
fileEditDisplayMode: "summary",
|
fileEditDisplayMode: "summary",
|
||||||
};
|
};
|
||||||
|
|
||||||
export function normalizeFileEditDisplayMode(value: unknown): FileEditDisplayMode {
|
function normalizeFileEditDisplayMode(value: unknown): FileEditDisplayMode {
|
||||||
return value === "diff" || value === "collapsed_diff" ? value : "summary";
|
return value === "diff" || value === "collapsed_diff" ? value : "summary";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user