mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(cli,hub): resolve typecheck errors in codex reasoning effort (#432)
* fix(cli,hub): resolve typecheck errors in codex reasoning effort and notification test - Cast `getModelReasoningEffort()` return (string | null) to `ReasoningEffort | undefined` at three call sites in codexLocalLauncher.ts and runCodex.ts where the narrower type is expected. - Add missing `modelReasoningEffort: null` default in notificationHub.test.ts to satisfy the Session type contract. These errors were introduced in79a13d2and have been failing CI on main since 2026-04-10. * fix(cli): add missing getModelReasoningEffort to test mock session The test stub in codexLocalLauncher.test.ts was missing the getModelReasoningEffort method added in79a13d2, causing runtime TypeError in CI.
This commit is contained in:
@@ -82,7 +82,7 @@ export async function runCodex(opts: {
|
||||
}
|
||||
const sessionModelReasoningEffort = sessionInstance.getModelReasoningEffort();
|
||||
if (sessionModelReasoningEffort !== undefined) {
|
||||
currentModelReasoningEffort = sessionModelReasoningEffort ?? undefined;
|
||||
currentModelReasoningEffort = (sessionModelReasoningEffort ?? undefined) as ReasoningEffort | undefined;
|
||||
}
|
||||
sessionInstance.setPermissionMode(currentPermissionMode);
|
||||
sessionInstance.setModel(currentModel ?? null);
|
||||
@@ -106,7 +106,7 @@ export async function runCodex(opts: {
|
||||
}
|
||||
const sessionModelReasoningEffort = sessionWrapperRef.current?.getModelReasoningEffort();
|
||||
if (sessionModelReasoningEffort !== undefined) {
|
||||
currentModelReasoningEffort = sessionModelReasoningEffort ?? undefined;
|
||||
currentModelReasoningEffort = (sessionModelReasoningEffort ?? undefined) as ReasoningEffort | undefined;
|
||||
}
|
||||
const sessionCollaborationMode = sessionWrapperRef.current?.getCollaborationMode();
|
||||
if (sessionCollaborationMode) {
|
||||
|
||||
Reference in New Issue
Block a user