mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-03-18 22:33:08 +00:00
fix: Remove unused vars and improve type safety. Improve task recovery
This commit is contained in:
@@ -321,6 +321,8 @@ const initialState: AppState = {
|
||||
codexUsageLastUpdated: null,
|
||||
zaiUsage: null,
|
||||
zaiUsageLastUpdated: null,
|
||||
geminiUsage: null,
|
||||
geminiUsageLastUpdated: null,
|
||||
codexModels: [],
|
||||
codexModelsLoading: false,
|
||||
codexModelsError: null,
|
||||
@@ -2410,6 +2412,13 @@ export const useAppStore = create<AppState & AppActions>()((set, get) => ({
|
||||
// z.ai Usage Tracking actions
|
||||
setZaiUsage: (usage) => set({ zaiUsage: usage, zaiUsageLastUpdated: usage ? Date.now() : null }),
|
||||
|
||||
// Gemini Usage Tracking actions
|
||||
setGeminiUsage: (usage, lastUpdated) =>
|
||||
set({
|
||||
geminiUsage: usage,
|
||||
geminiUsageLastUpdated: lastUpdated ?? (usage ? Date.now() : null),
|
||||
}),
|
||||
|
||||
// Codex Models actions
|
||||
fetchCodexModels: async (forceRefresh = false) => {
|
||||
const state = get();
|
||||
|
||||
@@ -34,7 +34,7 @@ import type { ApiKeys } from './settings-types';
|
||||
import type { ChatMessage, ChatSession } from './chat-types';
|
||||
import type { TerminalState, TerminalPanelContent, PersistedTerminalState } from './terminal-types';
|
||||
import type { Feature, ProjectAnalysis } from './project-types';
|
||||
import type { ClaudeUsage, CodexUsage, ZaiUsage } from './usage-types';
|
||||
import type { ClaudeUsage, CodexUsage, ZaiUsage, GeminiUsage } from './usage-types';
|
||||
|
||||
/** State for worktree init script execution */
|
||||
export interface InitScriptState {
|
||||
@@ -299,6 +299,10 @@ export interface AppState {
|
||||
zaiUsage: ZaiUsage | null;
|
||||
zaiUsageLastUpdated: number | null;
|
||||
|
||||
// Gemini Usage Tracking
|
||||
geminiUsage: GeminiUsage | null;
|
||||
geminiUsageLastUpdated: number | null;
|
||||
|
||||
// Codex Models (dynamically fetched)
|
||||
codexModels: Array<{
|
||||
id: string;
|
||||
@@ -769,6 +773,9 @@ export interface AppActions {
|
||||
// z.ai Usage Tracking actions
|
||||
setZaiUsage: (usage: ZaiUsage | null) => void;
|
||||
|
||||
// Gemini Usage Tracking actions
|
||||
setGeminiUsage: (usage: GeminiUsage | null, lastUpdated?: number) => void;
|
||||
|
||||
// Codex Models actions
|
||||
fetchCodexModels: (forceRefresh?: boolean) => Promise<void>;
|
||||
setCodexModels: (
|
||||
|
||||
Reference in New Issue
Block a user