-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(tarko-agent): runtime settings #1561
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for agent-tars-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
server.agentOptions support
server.agentOptions supportserver.agentOptions support
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
95cb85b to
18e3746
Compare
✅ Deploy Preview for tarko ready!
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
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
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
user-provided value
| runtimeSettings | ||
| }); | ||
| } catch (error) { | ||
| console.error(`Error updating runtime settings for session ${sessionId}:`, error); |
Check warning
Code scanning / CodeQL
Log injection Medium
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
…ues" This reverts commit 726758b.
- 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
This reverts commit 84f4127.
- 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
Summary
Add configurable
server.runtimeSettingswith UI selector supporting boolean, binary enum, and multi-enum option types.runtime-settings-enable-thinking.mp4
Checklist