mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-07 06:28:20 +00:00
fix(codex): align cliproxy guidance with runtime behavior
This commit is contained in:
@@ -7,6 +7,7 @@ import type {
|
||||
CompatibleCliProviderDocLink,
|
||||
CodexDashboardDiagnostics,
|
||||
} from '@/hooks/use-codex-types';
|
||||
import { CLIPROXY_NATIVE_CODEX_RECIPE } from '@/lib/codex-config';
|
||||
|
||||
const DEFAULT_CODEX_DOC_LINKS = [
|
||||
{
|
||||
@@ -44,13 +45,6 @@ const DEFAULT_PROVIDER_DOCS: CompatibleCliProviderDocLink[] = [
|
||||
},
|
||||
];
|
||||
|
||||
const CLIPROXY_NATIVE_CODEX_RECIPE = `model_provider = "cliproxy"
|
||||
|
||||
[model_providers.cliproxy]
|
||||
base_url = "http://127.0.0.1:8317/api/provider/codex"
|
||||
env_key = "CLIPROXY_API_KEY"
|
||||
wire_api = "responses"`;
|
||||
|
||||
function renderTextWithLinks(text: string): ReactNode[] {
|
||||
const urlPattern = /https?:\/\/[^\s)]+/g;
|
||||
const nodes: ReactNode[] = [];
|
||||
|
||||
@@ -22,15 +22,9 @@ import {
|
||||
TableRow,
|
||||
} from '@/components/ui/table';
|
||||
import type { CodexDashboardDiagnostics } from '@/hooks/use-codex-types';
|
||||
import { CLIPROXY_NATIVE_CODEX_RECIPE } from '@/lib/codex-config';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
const CLIPROXY_NATIVE_CODEX_RECIPE = `model_provider = "cliproxy"
|
||||
|
||||
[model_providers.cliproxy]
|
||||
base_url = "http://127.0.0.1:8317/api/provider/codex"
|
||||
env_key = "CLIPROXY_API_KEY"
|
||||
wire_api = "responses"`;
|
||||
|
||||
function formatTimestamp(value: number | null | undefined): string {
|
||||
if (!value || !Number.isFinite(value)) return 'N/A';
|
||||
return new Date(value).toLocaleString();
|
||||
@@ -65,6 +59,10 @@ interface CodexOverviewTabProps {
|
||||
}
|
||||
|
||||
export function CodexOverviewTab({ diagnostics }: CodexOverviewTabProps) {
|
||||
const inspectProfileCommand = diagnostics.config.activeProfile
|
||||
? `codex --profile ${diagnostics.config.activeProfile}`
|
||||
: 'codex';
|
||||
|
||||
return (
|
||||
<ScrollArea className="h-full">
|
||||
<div className="space-y-4 pr-1">
|
||||
@@ -88,6 +86,10 @@ export function CodexOverviewTab({ diagnostics }: CodexOverviewTabProps) {
|
||||
<code>[model_providers.cliproxy]</code> entry if you want CLIProxy as the saved native
|
||||
default.
|
||||
</p>
|
||||
<p>
|
||||
Built-in <code>openai</code> and <code>oss</code> providers are also valid native
|
||||
defaults and do not need a custom <code>[model_providers]</code> stanza.
|
||||
</p>
|
||||
<p>
|
||||
Saved default targets for API profiles and variants still remain on Claude or Droid.
|
||||
</p>
|
||||
@@ -281,9 +283,13 @@ export function CodexOverviewTab({ diagnostics }: CodexOverviewTabProps) {
|
||||
description: 'Use the explicit built-in Codex provider route.',
|
||||
},
|
||||
{
|
||||
label: 'Workspace trust',
|
||||
command: `codex --profile ${diagnostics.config.activeProfile || 'default'}`,
|
||||
description: 'Inspect the active profile directly in native Codex.',
|
||||
label: diagnostics.config.activeProfile
|
||||
? 'Inspect active profile'
|
||||
: 'Open native Codex',
|
||||
command: inspectProfileCommand,
|
||||
description: diagnostics.config.activeProfile
|
||||
? 'Inspect the active named profile directly in native Codex.'
|
||||
: 'Open native Codex without forcing a named profile overlay.',
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user