Skip to content

Conversation

@ulivz
Copy link
Member

@ulivz ulivz commented Sep 18, 2025

Summary

Add configurable server.runtimeSettings with UI selector supporting boolean, binary enum, and multi-enum option types.

runtime-settings-enable-thinking.mp4

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 18, 2025

Deploy Preview for agent-tars-docs ready!

Name Link
🔨 Latest commit 42376b6
🔍 Latest deploy log https://app.netlify.com/projects/agent-tars-docs/deploys/68d269f65c6f6f00084487bf
😎 Deploy Preview https://deploy-preview-1561--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.

@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 14.26%. Comparing base (f380287) to head (f29e87a).
⚠️ Report is 29 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1561   +/-   ##
=======================================
  Coverage   14.26%   14.26%           
=======================================
  Files         250      250           
  Lines        8562     8562           
  Branches     1672     1672           
=======================================
  Hits         1221     1221           
  Misses       7166     7166           
  Partials      175      175           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ulivz ulivz changed the title feat(tarko-agent): add agent options configuration support feat(tarko-server): add server.agentOptions support Sep 18, 2025
@ulivz ulivz changed the title feat(tarko-server): add server.agentOptions support WIP: feat(tarko-server): add server.agentOptions support Sep 20, 2025
Add configurable agent options with UI selector in navbar:
- Add agentOptions field to AgentServerOptions interface
- Add agentOptions to SessionItemMetadata for persistence
- Implement GET/POST /api/v1/sessions/agent-options endpoints
- Create AgentOptionsSelector component with dropdown UI
- Support boolean, binary enum, and multi-enum option types
- Integrate with existing model selector in navbar
- Move AgentOptionsSelector from Navbar to ChatInput
- Create ChatGPT-style dropdown interface with better UX
- Position options selector next to file upload button
- Improve visual design with animations and better layout
- Support boolean toggles, binary enums, and multi-select options
- Add detailed feature documentation with examples
- Include basic and advanced implementation examples
- Cover configuration, API reference, and best practices
- Provide troubleshooting guide and migration tips
- Add practical code examples for different use cases
@ulivz ulivz force-pushed the feat/agent-options-config branch from 95cb85b to 18e3746 Compare September 22, 2025 01:12
@netlify
Copy link

netlify bot commented Sep 22, 2025

Deploy Preview for tarko ready!

Name Link
🔨 Latest commit 42376b6
🔍 Latest deploy log https://app.netlify.com/projects/tarko/deploys/68d269f666cff1000895c62d
😎 Deploy Preview https://deploy-preview-1561--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.

- Add agent-options.mdx to both en and zh examples
- Update _meta.json files to include new example
- Fix API usage to use correct Agent class extension pattern
- Remove old docs/examples directory
- Provide comprehensive basic and advanced examples
- Create agent-options.mdx for zh locale
- Translate all content including titles, descriptions, and code comments
- Maintain consistent structure with English version
- Provide comprehensive examples in Chinese
- Replace non-existent /guide/advanced/agent-options link
- Point to existing /guide/basic/configuration documentation
- Fix links in both English and Chinese versions
- Remove docs/features/agent-options.md as requested
- Fix multimodal/websites/tarko/docs/zh/examples/agent-options.mdx to keep AI terminology in English
- Changed 智能体 to Agent, 选项 to Options, 工具 to Tool, etc. to follow professional standards
…ntation

- Rename agentOptions to runtimeSettings in API endpoints
- Update AgentSession to support runtime settings transform function
- Fix API service methods to use correct endpoints
- Remove obsolete agent-options documentation files
- Update documentation references in meta.json files
- Ensure proper integration between UI and backend
currentValues: mergedValues
});
} catch (error) {
console.error(`Error getting runtime settings for session ${sessionId}:`, error);

Check failure

Code scanning / CodeQL

Use of externally-controlled format string High

Format string depends on a
user-provided value
.
currentValues: mergedValues
});
} catch (error) {
console.error(`Error getting runtime settings for session ${sessionId}:`, error);

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
runtimeSettings
});
} catch (error) {
console.error(`Error updating runtime settings for session ${sessionId}:`, error);

Check failure

Code scanning / CodeQL

Use of externally-controlled format string High

Format string depends on a
user-provided value
.
runtimeSettings
});
} catch (error) {
console.error(`Error updating runtime settings for session ${sessionId}:`, error);

Check warning

Code scanning / CodeQL

Log injection Medium

Log entry depends on a
user-provided value
.
…t files

- Restore multimodal/agent-tars/interface/src/core.ts to original state
- Remove accidentally created multimodal/agent-tars/core/src/1.ts
- Remove test file multimodal/test-runtime-settings.js
- Fix TypeScript error TS7053 by adding Record<string, any> type
- Ensure proper type safety for runtime settings merging
- Replace text with + icon for cleaner appearance
- Increase z-index to prevent ChatInput overlay
- Position selector as leftmost control in ChatInput
- Add rotation animation for + icon (45° when open)
- Improve button styling with consistent sizing
- Implement React Portal to render popup in document.body
- Calculate absolute position based on button coordinates
- Add scroll and resize listeners to update position
- Improve click outside detection for portal content
- Set z-index to 10000 to ensure proper layering
- Fix popup positioning above button with proper offset
- Use CSS transform translateY(-100%) for precise positioning
- Reduce margin to 8px for closer placement to button
- Remove hardcoded popup height calculation
- Popup now appears directly above button with minimal gap
- Change positioning to rect.bottom + 8px (below button)
- Remove translateY(-100%) transform
- Popup now appears directly below the + button
- Fixes weird floating popup positioning issue
…popup

- Automatically detect available space above/below button
- Show popup below button when sufficient space available
- Show popup above button when space below is insufficient
- Add placement state to track current position
- Use transform translateY(-100%) for above placement
- Improve UX by preventing popup from going off-screen
- Default to 'above' placement to prevent popup from covering input area
- Only place below when there's significantly more space below (100px buffer)
- Ensures popup doesn't interfere with typing experience
- Fixes issue where popup blocks the input field
…lector

- Add new Dropdown component to @tarko/ui based on @headlessui/react
- Replace custom Portal implementation with Headless UI Menu
- Remove manual position calculation and event handling
- Simplify component with built-in accessibility and positioning
- Use top-start placement to avoid covering input area
- Remove 150+ lines of custom dropdown logic
- Export Dropdown components from tarko/ui basic components
- Add createPortal to render dropdown menu in document.body
- Implement manual position calculation with ref tracking
- Add scroll and resize listeners for position updates
- Use fixed positioning with calculated coordinates
- Prevent clipping by parent containers with overflow hidden
- Support top/bottom placement with proper transforms
- Change render prop to always return ReactElement
- Use ternary operator instead of logical AND
- Return empty div when menu is closed
- Fixes TS2322 type assignment error
- Replace render prop pattern with custom state management
- Use hidden Menu.Items to satisfy Headless UI requirements
- Create separate Portal for visible dropdown content
- Add manual click outside handling with overlay
- Remove Menu.Item dependency for simpler implementation
- Fix Fragment props passing error
- Add smart positioning with space detection
- Prefer above placement to avoid covering input
- Calculate available space above and below button
- Use dynamic transform based on placement decision
- Add transform to position state for proper positioning
- Ensure dropdown appears in correct location relative to trigger
- Revert to standard Headless UI Menu + Transition pattern
- Remove all custom Portal and positioning logic
- Use built-in Transition component for animations
- Add fixed positioning and high z-index for overflow issues
- Keep it simple with proven Headless UI patterns
- No more custom shit, just use what works
- Add DropdownSubMenu component for nested enum options
- Replace flat enum display with submenu structure
- Improve UX with hover and click interactions
- Show current selected value in parent menu item
- Fix submenu disappearing when mouse moves to submenu
- Add mouse movement detection and delayed closing
- Improve current value display with 'Current:' prefix
- Add proper mouse event handling for submenu stability
- Move current value to same line as option name
- Add pill-style background for current value display
- Improve visual hierarchy with inline value tags
- Fix dropdown item text wrapping with proper flex layout
- Add min-width, truncate, and flex-shrink controls
- Show enum values in chat input tags with [value] format
- Always display enum options in active options list
- Improve responsive layout for narrow containers
- Replace bracket notation with pill-style badges
- Add blue theme coloring and subtle borders
- Use rounded-md instead of rounded-full for modern look
- Improve visual hierarchy with proper spacing and typography
- Consistent styling across dropdown and chat input tags
- Dropdown: Use subtle gray pill with rounded-full design
- Chat input: Add glass-morphism effect with backdrop-blur
- Remove overly colorful blue theme for cleaner look
- Improve spacing and typography hierarchy
- Add subtle borders and transparency for modern feel
- Remove all background colors and borders for cleaner look
- Use simple text-only approach with subtle gray coloring
- Increase gap spacing for better visual breathing room
- Eliminate visual noise while maintaining clear hierarchy
- Focus on typography and spacing over decorative elements
- Fix toggleOption to cycle through enum values instead of always reverting to default
- Add proper enum value cycling logic with currentIndex + 1
- Now clicking enum tags in chat input will cycle: hybrid -> dom -> visual-grounding -> hybrid
- Maintain existing dropdown submenu functionality for detailed selection
- Change tag click behavior: clicking tag body does nothing
- Add dedicated X button for clearing options
- Implement clearOption method in AgentOptionsSelector
- Boolean options: clear sets to false (disabled)
- Enum options: clear sets to default value
- Remove onToggleOption prop, use ref methods instead
- Improve tag layout with separate clickable X button
- Runtime settings tags are now non-clickable (read-only)
- Only left close button is interactive for removing options
- Clicking close completely removes the option (no default fallback)
- Tags disappear when option is removed from active state
- Options only show when explicitly set (not using defaults)
- Revert to original hover-based X icon overlay design
- Maintain remove functionality while preserving visual consistency
- Reduce shadow intensity from shadow-2xl to shadow-lg
- Darken border colors for better visibility
- Adjust shadow opacity for cleaner appearance
…r icon

- Increase submenu width from w-56 to w-64 for better spacing
- Add more padding to dropdown items (px-4 py-3) for elegance
- Add TbBrowser icon for browser-related options
- Improve visual hierarchy matching ChatGPT's design principles
- Standardize both main and sub menu to rounded-xl and w-56
- Reduce padding from p-2 to p-1.5 for better compactness
- Update shadow and border styling for consistency
- Align border radius between main dropdown and submenu
- Improve visual hierarchy and spacing
- Update text from 'Upload Images' to 'Add Images' for better UX
- Aligns with modern UI patterns using 'Add' instead of 'Upload'
- Change border radius from rounded-xl to rounded-2xl for more elegant appearance
- Reduce item padding from py-2.5 to py-2 for more compact layout
- Apply changes to both main dropdown and submenu components
- Improve visual consistency and modern design aesthetics
- Add gradient background from blue to indigo for modern appearance
- Increase padding (px-3 py-1.5) for better touch targets
- Add subtle border and shadow effects with hover states
- Make title font semibold for better hierarchy
- Improve value badge styling with enhanced contrast
- Add smooth hover animations with shadow elevation
…pactness

- Reduce padding from px-3 py-1.5 to px-2.5 py-1 for smaller tag size
- Decrease icon margin from mr-2 to mr-1.5 for tighter spacing
- Change font weight from semibold to medium for less visual weight
- Reduce value badge spacing (ml-2 to ml-1.5, px-2 to px-1.5)
- Maintain visual quality while achieving more compact layout
@ulivz ulivz changed the title WIP: feat(tarko-agent): runtime settings feat(tarko-agent): runtime settings Sep 23, 2025
@ulivz ulivz merged commit a59d33d into main Sep 23, 2025
9 of 10 checks passed
@ulivz ulivz deleted the feat/agent-options-config branch September 23, 2025 10:00
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.

3 participants