mirror of
https://github.com/MervinPraison/PraisonAIUI.git
synced 2026-11-07 05:56:17 -10:00
* feat: wire YAML profile selection to agent instructions (fixes #61) - Modified _get_agent() in cli.py to read selected profile via get_selected_profile() - Added profile-aware agent caching using profile ID as cache key - Profiles can now include optional 'instructions' field for custom behavior - Falls back to root-level instructions when profile has no specific instructions - Maintains backward compatibility with existing YAML configs - Resolves persona model split where UI profiles were cosmetic only Co-authored-by: Claude <[email protected]> * feat: fix persona model split - wire profile selection to agent behavior in YAML mode (fixes #61) - Modified _get_agent() in cli.py to use selected profile for agent resolution - Added support for per-profile instructions, model, and name fields in YAML - Profile selection now creates distinct agent instances with different cache keys - Updated example YAML files to demonstrate profile-specific instructions - Added comprehensive unit tests validating the fix - Maintains backward compatibility with existing configurations Co-authored-by: Mervin Praison <[email protected]> * fix: implement all gemini-code-assist defensive programming and test improvements - Add defensive dict type checking in profile iteration (prevents AttributeError) - Improve fallback logic using 'or' instead of dict.get() to handle None/empty values - Enhance test coverage with actual behavioral validation instead of trivial assert Fixes identified architectural issues for robust YAML profile handling. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <[email protected]> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude <[email protected]> Co-authored-by: Mervin Praison <[email protected]> Co-authored-by: MervinPraison <[email protected]>
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
# Test file for persona fix - profiles now support distinct instructions
|
|
name: Test Persona Fix
|
|
instructions: |
|
|
You are a general assistant. This should only be used as fallback.
|
|
|
|
welcome: "👋 Select a profile to see different agent behaviors!"
|
|
|
|
profiles:
|
|
- name: Code Expert
|
|
description: Code review, debugging, and generation
|
|
icon: 💻
|
|
instructions: |
|
|
You are an expert programmer. Always respond with technical precision,
|
|
use code examples, and focus on best practices. Be concise and technical.
|
|
|
|
- name: Writer
|
|
description: Creative and technical writing
|
|
icon: ✍️
|
|
instructions: |
|
|
You are a creative writer. Use flowing prose, metaphors, and engaging
|
|
language. Make your responses vivid and expressive. Be artistic and imaginative.
|
|
|
|
- name: Data Analyst
|
|
description: Data analysis and visualization
|
|
icon: 📊
|
|
instructions: |
|
|
You are a data analyst. Always think in terms of data, metrics, and insights.
|
|
Use structured analysis, mention specific visualization types, and be analytical.
|
|
|
|
starters:
|
|
- label: "Test Code Profile"
|
|
message: "Explain what a function is"
|
|
icon: "💻"
|
|
- label: "Test Writer Profile"
|
|
message: "Explain what a function is"
|
|
icon: "✍️"
|
|
- label: "Test Analyst Profile"
|
|
message: "Explain what a function is"
|
|
icon: "📊" |