refactor: standardize InstanceState variable name to state

Rename cache → state across all services for consistency. The
InstanceState handle is now always named state, matching the
majority convention.
This commit is contained in:
Kit Langton
2026-03-31 09:28:16 -04:00
parent 71b20698bb
commit 9dd4be8090
8 changed files with 65 additions and 65 deletions
+3 -3
View File
@@ -161,15 +161,15 @@ export namespace Command {
}
})
const cache = yield* InstanceState.make<State>((ctx) => init(ctx))
const state = yield* InstanceState.make<State>((ctx) => init(ctx))
const get = Effect.fn("Command.get")(function* (name: string) {
const state = yield* InstanceState.get(cache)
const state = yield* InstanceState.get(state)
return state.commands[name]
})
const list = Effect.fn("Command.list")(function* () {
const state = yield* InstanceState.get(cache)
const state = yield* InstanceState.get(state)
return Object.values(state.commands)
})