mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-14 20:17:03 +00:00
feat(codex-dashboard): add manual long-context controls
This commit is contained in:
1 parent
b3ec9ff78d
commit
3246c40319
9 files changed
+359
-1
No files matched your search
@@ -91,6 +91,8 @@ export interface CodexSupportMatrixEntry {
|
||||
export interface CodexUserConfigDiagnostics {
|
||||
model: string | null;
|
||||
modelReasoningEffort: string | null;
|
||||
modelContextWindow: number | null;
|
||||
modelAutoCompactTokenLimit: number | null;
|
||||
modelProvider: string | null;
|
||||
activeProfile: string | null;
|
||||
approvalPolicy: string | null;
|
||||
@@ -137,6 +139,8 @@ export interface CodexRawConfigResponse {
|
||||
export interface CodexTopLevelSettingsPatch {
|
||||
model?: string | null;
|
||||
modelReasoningEffort?: string | null;
|
||||
modelContextWindow?: number | null;
|
||||
modelAutoCompactTokenLimit?: number | null;
|
||||
modelProvider?: string | null;
|
||||
approvalPolicy?: string | null;
|
||||
sandboxMode?: string | null;
|
||||
|
||||
@@ -243,6 +243,18 @@ function applyTopLevelSettingsPatch(
|
||||
'model_reasoning_effort'
|
||||
);
|
||||
}
|
||||
if (hasOwn(values, 'modelContextWindow')) {
|
||||
setNumberField(target, 'model_context_window', values.modelContextWindow, {
|
||||
integer: true,
|
||||
min: 1,
|
||||
});
|
||||
}
|
||||
if (hasOwn(values, 'modelAutoCompactTokenLimit')) {
|
||||
setNumberField(target, 'model_auto_compact_token_limit', values.modelAutoCompactTokenLimit, {
|
||||
integer: true,
|
||||
min: 1,
|
||||
});
|
||||
}
|
||||
if (hasOwn(values, 'modelProvider')) {
|
||||
setStringField(target, 'model_provider', values.modelProvider);
|
||||
}
|
||||
@@ -778,6 +790,8 @@ export async function getCodexDashboardDiagnostics(): Promise<CodexDashboardDiag
|
||||
config: {
|
||||
model: asString(config?.model),
|
||||
modelReasoningEffort: asString(config?.model_reasoning_effort),
|
||||
modelContextWindow: asNumber(config?.model_context_window),
|
||||
modelAutoCompactTokenLimit: asNumber(config?.model_auto_compact_token_limit),
|
||||
modelProvider: asString(config?.model_provider),
|
||||
activeProfile,
|
||||
approvalPolicy: summarizeApprovalPolicy(config?.approval_policy),
|
||||
|
||||
Reference in new issue
Block a user