- Added new image assets: image_mode.png, logo-with-bg.png, image-provider.png, and openai.png. - Enhanced presentation generation state to include theme property. - Introduced updateTheme action in presentation generation slice. - Updated user configuration with default LLM and image provider settings. - Modified Tailwind CSS configuration to include new font families. - Improved API utility functions for better handling of URLs in Electron environment. - Adjusted PPTX model utility for border radius handling. - Expanded provider constants to include URLs and icons for LLM providers. - Updated provider utility functions for consistent API URL usage. - Added new quality options for image generation providers. - Updated package-lock.json to include new dependencies for react-colorful and scheduler.
32 lines
No EOL
801 B
TypeScript
32 lines
No EOL
801 B
TypeScript
import { LLMConfig } from "@/types/llm_config";
|
|
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
|
|
|
interface UserConfigState {
|
|
can_change_keys: boolean
|
|
llm_config: LLMConfig
|
|
}
|
|
|
|
const initialState: UserConfigState = {
|
|
llm_config: {
|
|
LLM: "openai",
|
|
IMAGE_PROVIDER: "gpt-image-1.5",
|
|
|
|
},
|
|
can_change_keys: false,
|
|
}
|
|
|
|
const userConfigSlice = createSlice({
|
|
name: "userConfig",
|
|
initialState: initialState,
|
|
reducers: {
|
|
setLLMConfig: (state, action: PayloadAction<LLMConfig>) => {
|
|
state.llm_config = action.payload;
|
|
},
|
|
setCanChangeKeys: (state, action: PayloadAction<boolean>) => {
|
|
state.can_change_keys = action.payload;
|
|
}
|
|
},
|
|
});
|
|
|
|
export const { setLLMConfig, setCanChangeKeys } = userConfigSlice.actions;
|
|
export default userConfigSlice.reducer; |