MCPcopy Create free account
hub / github.com/tiann/hapi / applySlashUpdates

Function applySlashUpdates

cli/src/codex/runCodex.ts:113–133  ·  view source on GitHub ↗
(updates: {
        permissionMode?: PermissionMode;
        model?: string | null;
        modelReasoningEffort?: ReasoningEffort | null;
        collaborationMode?: EnhancedMode['collaborationMode'];
    } | undefined)

Source from the content-addressed store, hash-verified

111 };
112
113 const applySlashUpdates = (updates: {
114 permissionMode?: PermissionMode;
115 model?: string | null;
116 modelReasoningEffort?: ReasoningEffort | null;
117 collaborationMode?: EnhancedMode['collaborationMode'];
118 } | undefined): void => {
119 if (!updates) return;
120 if (updates.permissionMode !== undefined) {
121 currentPermissionMode = updates.permissionMode;
122 }
123 if (updates.model !== undefined) {
124 currentModel = updates.model ?? undefined;
125 }
126 if (updates.modelReasoningEffort !== undefined) {
127 currentModelReasoningEffort = updates.modelReasoningEffort ?? undefined;
128 }
129 if (updates.collaborationMode !== undefined) {
130 currentCollaborationMode = updates.collaborationMode;
131 }
132 applyCurrentConfigToSession();
133 };
134
135 const syncCurrentConfigFromSession = (): void => {
136 const sessionPermissionMode = sessionWrapperRef.current?.getPermissionMode();

Callers 1

runCodexFunction · 0.85

Calls 1

Tested by

no test coverage detected