Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Sep 25, 2025

Summary

Implements support for configuring RuntimeSettings on the home page before session creation, addressing Issue #1644. Users can now configure Agent options before starting a conversation, with the selected settings automatically applied when creating a new session.

Architecture: '/' -> '/creating' -> '/{sessionId}' flow now supports passing AgentOptions and Runtime Settings through the entire pipeline.

Close: #1644

Checklist

  • Added or updated necessary tests (Optional).
  • Updated documentation to align with changes (Optional).
  • Verified no breaking changes, or prepared solutions for any occurring breaking changes (Optional).
  • My change does not involve the above items.

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 141b46b
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68d559910e24100007d10749
😎 Deploy Preview https://deploy-preview-1645--agent-tars-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Sep 25, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit 141b46b
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/68d55991ac344e0008cdb63b
😎 Deploy Preview https://deploy-preview-1645--tarko.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ulivz ulivz force-pushed the feat/agent-options-home-to-session branch from 7c9a01a to bce7fb9 Compare September 25, 2025 12:42
…sion creation

- Extend apiService.createSession to accept runtimeSettings parameter
- Add global runtime settings state management with jotai atoms
- Create HomeAgentOptionsSelector wrapper for home page
- Update ChatInput to support home variant with conditional rendering
- Update WelcomePage to pass selected RuntimeSettings to session creation
- Update sessionActions to support runtimeSettings parameter

Implements architecture for passing AgentOptions from home page through
'/creating' flow to session creation, enabling users to configure
RuntimeSettings before starting conversations.
…onsSelector

- Remove AGENT_OPTIONS_SCHEMA endpoint from constants (not implemented in server)
- Remove getDefaultAgentOptionsSchema method from apiService
- Fix HomeAgentOptionsSelector to use temporary session for schema loading
- Use existing API endpoints instead of non-existent ones
- Add runtimeSettings parameter to createSession request body
- Store runtimeSettings in session metadata when creating new session
- Apply runtime settings to agent configuration immediately after session creation
- Maintain backward compatibility with sessions created without runtime settings
…ons support

- Add /creating route to App.tsx router configuration
- Create CreatingPage component to handle session creation with agent options
- Support multiple sources for agent options:
  1. Router state (internal navigation from home page)
  2. Global runtime settings (from HomeAgentOptionsSelector)
  3. URL search params (for deployment users)
- Simplify HomeAgentOptionsSelector to use placeholder session approach
- Update AgentOptionsSelector to handle 'home-placeholder' sessionId
- Modify WelcomePage to navigate to /creating with state
- Add deleteSession method to apiService for cleanup
- Fix agent options flow: '/' -> '/creating' -> '/{sessionId}'
…utes

- Move getRuntimeSettings and updateRuntimeSettings from sessions to system controller
- Add /api/v1/runtime-settings endpoints to system routes (not affected by sessionRestoreMiddleware)
- getRuntimeSettings now supports optional sessionId parameter:
  - No sessionId: returns only schema (for home page)
  - With sessionId: returns schema + current values (for session page)
- updateRuntimeSettings still requires sessionId (future: global settings support)
- Update frontend apiService to use new endpoints
- Simplify AgentOptionsSelector to avoid temporary session creation
- Fix home page runtime settings loading without session dependency
…me page

- Create HomeChatBottomSettings component for home page
- Support chat-bottom placement options on home page without session dependency
- Load schema from system endpoint (/api/v1/runtime-settings) without sessionId
- Handle boolean toggles and enum dropdowns for chat-bottom options
- Integrate with global runtime settings state
- Add HomeChatBottomSettings to ChatInput home variant
- Fix home page not showing chat-bottom options like 'enableThinking' and 'browserMode'
…ettings

- Add onOptionChange prop to ChatBottomSettings for custom option handling
- HomeChatBottomSettings now reuses ChatBottomSettings instead of duplicating code
- Support both session mode (API calls) and home mode (global state) in single component
- Maintain consistent UI/UX while avoiding code duplication
- Follow same pattern as HomeAgentOptionsSelector reusing AgentOptionsSelector
…reating

- Add distinct handling for persistent runtimeSettings vs one-time agentOptions
- Support 3 parameters: query, runtimeSettings, agentOptions
- runtimeSettings: persistent session configuration (stored in DB)
- agentOptions: one-time task parameters (for single query execution)
- Update URL parameter parsing to support both types
- Add TODO for agentOptions API integration when backend supports it
…ion\n\n- Update Agent Server createSession API to accept agentOptions parameter\n- Modify AgentSession constructor to support one-time agent initialization options\n- Update apiService.createSession to pass both runtimeSettings and agentOptions\n- Fix Home page navigation to properly pass runtimeSettings vs agentOptions\n- Enable WelcomeCards to pass card-specific agentOptions during session creation\n- Support URL parameter passing for deployment users via /creating route\n- Ensure proper separation between persistent session settings and one-time options
…vice call\n\n- Replace direct apiService.createSession() with createSessionAction in CreatingPage\n- Ensure activeSessionId is properly set before calling sendMessage\n- Fix "No active session" error when sending initial query after session creation
@ulivz ulivz force-pushed the feat/agent-options-home-to-session branch from 2e19970 to 62fa300 Compare September 25, 2025 14:35
@ulivz ulivz changed the title feat(tarko-agent-ui): support RuntimeSettings in home page before session creation feat(tarko-agent-server, agent-ui): refine arch of agent options and settings from home to session Sep 25, 2025
…s support from PR #1645

- Add getRuntimeSettings and updateRuntimeSettings to system controller
- Add runtime settings endpoints to system routes
- Remove old runtime settings functions from sessions controller
- Update AgentSessionFactory to support runtimeSettings and agentOptions in createSession
- Update AgentSession constructor and createAndInitializeAgent to handle agentOptions
- Support one-time agent initialization options for home-to-session flow
@ZhaoHeh ZhaoHeh merged commit 3a27504 into main Sep 25, 2025
8 of 9 checks passed
@ZhaoHeh ZhaoHeh deleted the feat/agent-options-home-to-session branch September 25, 2025 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support RuntimeSettings configuration in home page before session creation

3 participants