wip: snapshot das alterações não commitadas (2026-10-20)
release.yml (push) Invalid workflow file

Origem: D:/Documents/Github/OllaHub
Arquivos omitidos (segredos, bancos de dados, logs, >50 MB): 0
This commit is contained in:
evandro committed 2026-10-20 00:49:46 -03:00
1 parent a7cbd1a3b4
commit 861af0bb9f
217 files changed
+39421 -1340

No files matched your search

+26 -40
View File
@@ -51,10 +51,10 @@ export interface SettingsState {
// Sources Config (from Rust backend)
sourcesConfig: SourcesConfig | null;
// AutoStart
autoStart: boolean;
// Notifications
notifications: {
enabled: boolean;
@@ -67,7 +67,6 @@ export interface SettingsState {
// Debug
debugMode: boolean;
<<<<<<< HEAD
// Setup
isSetupCompleted: boolean;
@@ -82,8 +81,7 @@ export interface SettingsState {
topK: number;
};
=======
>>>>>>> 593efd42e091a845dea82ee6646e027bce1e18c5
// Query Preprocessing
queryPreprocessing: {
enabled: boolean;
@@ -117,7 +115,7 @@ export interface SettingsState {
addCustomSite: (site: string) => void;
removeCustomSite: (site: string) => void;
resetSettings: () => void;
// New Actions for Sources & AutoStart
fetchSources: () => Promise<void>;
saveSources: (config: SourcesConfig) => Promise<void>;
@@ -125,19 +123,17 @@ export interface SettingsState {
setNotificationsEnabled: (enabled: boolean) => void;
addNotificationKeyword: (keyword: string) => void;
removeNotificationKeyword: (keyword: string) => void;
// Updates Actions
setAutoCheckUpdates: (enabled: boolean) => void;
// Debug Actions
setDebugMode: (enabled: boolean) => void;
<<<<<<< HEAD
// Setup Actions
setSetupCompleted: (completed: boolean) => void;
=======
>>>>>>> 593efd42e091a845dea82ee6646e027bce1e18c5
// Query Preprocessing Actions
setQueryPreprocessingEnabled: (enabled: boolean) => void;
setQueryPreprocessingMinLength: (min: number) => void;
@@ -145,7 +141,7 @@ export interface SettingsState {
setQueryPreprocessingAutoSplit: (autoSplit: boolean) => void;
addIrrelevantPattern: (pattern: string) => void;
removeIrrelevantPattern: (pattern: string) => void;
// Content Processing Actions
setContentProcessingEnabled: (enabled: boolean) => void;
setContentProcessingAutoSummarize: (enabled: boolean) => void;
@@ -154,7 +150,7 @@ export interface SettingsState {
setContentProcessingMinRelevanceScore: (score: number) => void;
setContentProcessingUseKeyFactsExtraction: (enabled: boolean) => void;
setContentProcessingFallbackToSummarization: (enabled: boolean) => void;
// Runtime Actions
setRuntime: (runtime: 'ollama' | 'llama-cpp') => void;
setLlamaCppParams: (params: Partial<SettingsState['llamaCppParams']>) => void;
@@ -274,9 +270,8 @@ const initialState = {
},
autoCheckUpdates: true,
debugMode: false,
<<<<<<< HEAD
isSetupCompleted: false,
runtime: 'ollama',
runtime: 'ollama' as const,
llamaCppParams: {
nGpuLayers: 0, // CPU por padrão
nCtx: 4096,
@@ -285,8 +280,7 @@ const initialState = {
topP: 0.9,
topK: 40,
},
=======
>>>>>>> 593efd42e091a845dea82ee6646e027bce1e18c5
queryPreprocessing: {
enabled: true,
minLength: 3,
@@ -381,13 +375,13 @@ export const useSettingsStore = create<SettingsState>()(
searxng: { ...s.webSearch.searxng, status: 'checking' as const },
},
}));
try {
const { invoke } = await import('@tauri-apps/api/core');
const isAvailable = await invoke<boolean>('check_searxng_status', {
url: state.webSearch.searxng.url,
});
set((s) => ({
webSearch: {
...s.webSearch,
@@ -471,7 +465,7 @@ export const useSettingsStore = create<SettingsState>()(
},
})),
resetSettings: () => set(initialState),
// Sources Config Actions
fetchSources: async () => {
try {
@@ -492,13 +486,13 @@ export const useSettingsStore = create<SettingsState>()(
throw error;
}
},
// AutoStart Actions
toggleAutoStart: async () => {
// TODO: Implementar quando tauri-plugin-autostart estiver configurado
set((state) => ({ autoStart: !state.autoStart }));
},
// Notifications Actions
setNotificationsEnabled: (enabled) =>
set((state) => ({
@@ -524,22 +518,20 @@ export const useSettingsStore = create<SettingsState>()(
keywords: state.notifications.keywords.filter((k) => k !== keyword),
},
})),
// Updates Actions
setAutoCheckUpdates: (enabled) =>
set({ autoCheckUpdates: enabled }),
// Debug Actions
setDebugMode: (enabled) =>
set({ debugMode: enabled }),
<<<<<<< HEAD
// Setup Actions
setSetupCompleted: (completed) =>
set({ isSetupCompleted: completed }),
=======
>>>>>>> 593efd42e091a845dea82ee6646e027bce1e18c5
// Query Preprocessing Actions
setQueryPreprocessingEnabled: (enabled) =>
set((state) => ({
@@ -579,7 +571,7 @@ export const useSettingsStore = create<SettingsState>()(
),
},
})),
// Content Processing Actions
setContentProcessingEnabled: (enabled) =>
set((state) => ({
@@ -609,7 +601,7 @@ export const useSettingsStore = create<SettingsState>()(
set((state) => ({
contentProcessing: { ...state.contentProcessing, fallbackToSummarization: enabled },
})),
// Runtime Actions
setRuntime: (runtime) => set({ runtime }),
setLlamaCppParams: (params) =>
@@ -619,11 +611,8 @@ export const useSettingsStore = create<SettingsState>()(
}),
{
name: 'ollahub-settings',
<<<<<<< HEAD
version: 7,
=======
version: 4,
>>>>>>> 593efd42e091a845dea82ee6646e027bce1e18c5
migrate: (persistedState: any, version: number) => {
// Migração da versão 1 para 3
if (version < 3) {
@@ -639,7 +628,6 @@ export const useSettingsStore = create<SettingsState>()(
debugMode: persistedState.debugMode ?? false,
};
}
<<<<<<< HEAD
// Migração da versão 4 para 5
if (version < 5) {
return {
@@ -678,8 +666,6 @@ export const useSettingsStore = create<SettingsState>()(
},
};
}
=======
>>>>>>> 593efd42e091a845dea82ee6646e027bce1e18c5
return persistedState;
},
}