mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-19 16:31:30 +00:00
refactor settings and scheduler
- Simplified task detail opening logic by integrating it into the `settingsModalStore` - Updated the visibility condition for the task detail view in `scheduler-task-detail.html` to rely solely on the selected task state rm attributes from components simplify task display logic settings components init scheduler componentize - Removed the inline scheduler settings script from `index.html` and replaced it with a new component structure in `scheduler-settings.html`, `scheduler-task-editor.html`, `scheduler-task-list.html`, and `scheduler-task-detail.html`. - Introduced a dedicated `scheduler-store.js` to manage state and logic for the scheduler, enhancing maintainability and separation of concerns. - Updated the `index.js` to remove the now obsolete `openTaskDetail` function, integrating task detail handling within the new store. - Removed the deprecated `scheduler.js` file, consolidating functionality into the new component architecture. settings modal store rename - Replaced all instances of `$store.settingsModalStore` with `$store.settingsStore` across various settings components. scheduler tab content x-if
This commit is contained in:
parent
a390adaa3c
commit
b823fcfb5d
41 changed files with 5151 additions and 3633 deletions
|
|
@ -7,6 +7,8 @@ from typing import Any
|
|||
|
||||
class SetSettings(ApiHandler):
|
||||
async def process(self, input: dict[Any, Any], request: Request) -> dict[Any, Any] | Response:
|
||||
set = settings.convert_in(input)
|
||||
set = settings.set_settings(set)
|
||||
return {"settings": set}
|
||||
# Convert SettingsOutput (sections/fields) into internal flat Settings,
|
||||
# persist it, then return the updated SettingsOutput back to the UI.
|
||||
internal = settings.convert_in(input)
|
||||
settings.set_settings(internal)
|
||||
return {"settings": settings.convert_out(settings.get_settings())}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue