Delay Codex provider availability until checked
- Initialize provider as unchecked in a pending state - Update initial probe message to reflect session-local status
This commit is contained in:
1 parent
fa9bcbc053
commit
35bc0902ae
1 file changed
+5
-5
@@ -59,7 +59,7 @@ class CodexDiscoveryCacheKey extends Data.Class<{
|
||||
readonly cwd: string;
|
||||
}> {}
|
||||
|
||||
function buildInitialCodexProviderSnapshot(codexSettings: CodexSettings): ServerProvider {
|
||||
const makePendingCodexProvider = (codexSettings: CodexSettings): ServerProvider => {
|
||||
const checkedAt = new Date().toISOString();
|
||||
const models = providerModelsFromSettings(
|
||||
BUILT_IN_CODEX_MODELS,
|
||||
@@ -92,14 +92,14 @@ function buildInitialCodexProviderSnapshot(codexSettings: CodexSettings): Server
|
||||
models,
|
||||
skills: [],
|
||||
probe: {
|
||||
installed: true,
|
||||
installed: false,
|
||||
version: null,
|
||||
status: "warning",
|
||||
auth: { status: "unknown" },
|
||||
message: "Checking Codex CLI availability...",
|
||||
message: "Codex provider status has not been checked in this session yet.",
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export function parseAuthStatusFromOutput(result: CommandResult): {
|
||||
readonly status: Exclude<ServerProviderState, "disabled">;
|
||||
@@ -563,7 +563,7 @@ export const CodexProviderLive = Layer.effect(
|
||||
Stream.map((settings) => settings.providers.codex),
|
||||
),
|
||||
haveSettingsChanged: (previous, next) => !Equal.equals(previous, next),
|
||||
buildInitialSnapshot: buildInitialCodexProviderSnapshot,
|
||||
initialSnapshot: makePendingCodexProvider,
|
||||
checkProvider,
|
||||
enrichSnapshot: ({ settings, snapshot, publishSnapshot }) =>
|
||||
enrichCodexSnapshotViaDiscovery({
|
||||
|
||||
Reference in new issue
Block a user