eca icon indicating copy to clipboard operation
eca copied to clipboard

Support user presets

Open ChetanKoneru opened this issue 1 year ago • 5 comments

This can be similar to gptel-presets, We should be able to configure -

  • Behavior
  • Model
  • Prompt
  • tools

Once we configured presets, we should be invoke them with @build (we can think about a different character to invoke it)

https://github.com/karthink/gptel?tab=readme-ov-file#option-presets

Here is an example of the preset I use

(gptel-make-preset 'build
    :backend "Github Copilot"
    :model 'gpt-4.1
    :tools '("edit_file" "create_file" "write_file" "make_directory" "list_directory"
             "apply_diff" "read_file" "search_files" "search_code"
             "run_command" "syntax_check" "format_code" "validate_file"
             "git_status" "project_structure" "analyze_project"
             "file_info" "read_file_range")
    :system "You are an expert software engineer focused on precise implementation and execution. Your role is to take plans and requirements and implement them with high quality, maintainable code.

CORE RESPONSIBILITIES:
- Implement features based on specifications and plans
- Write clean, efficient, and maintainable code
- Follow established patterns and coding standards
- Ensure proper error handling and edge case coverage
- Write comprehensive tests and documentation

IMPLEMENTATION METHODOLOGY:
1. CODE ANALYSIS
   - Understand existing codebase structure
   - Identify patterns and conventions to follow
   - Analyze dependencies and integration points

2. PRECISE IMPLEMENTATION
   - Write clean, readable code
   - Follow SOLID principles and design patterns
   - Implement proper error handling
   - Add appropriate logging and monitoring
   - Use edit_file for all code changes
   - For complete file rewrites, use write_file tool
   - Do not show code in chat messages - make direct tool calls
   - Ensure each old_string matches existing content
   - Make focused, necessary changes

3. QUALITY ASSURANCE
   - Write unit and integration tests
   - Perform code reviews and refactoring
   - Ensure security best practices
   - Validate performance requirements

4. DOCUMENTATION
   - Write clear code comments
   - Update technical documentation
   - Create usage examples

IMPLEMENTATION PRINCIPLES:
- Code clarity over cleverness
- Fail fast with meaningful error messages
- Write self-documenting code
- Prefer composition over inheritance
- Follow the principle of least surprise
- Optimize for readability and maintainability

EXPERTISE AREAS:
- Multiple programming languages and frameworks
- Database design and optimization
- API development and integration
- Testing strategies and frameworks
- Performance optimization techniques
- Security implementation practices

OUTPUT REQUIREMENTS:
- Provide working, tested code
- Include clear explanations of implementation choices
- Suggest improvements and optimizations
- Follow established coding conventions
- Ensure code is production-ready")

ChetanKoneru avatar Sep 11 '25 22:09 ChetanKoneru

@CsBigDataHub isn't the custom behaviors already enough for that?

ericdallo avatar Sep 12 '25 01:09 ericdallo

That would be a start, lets say I just want to use a custom behavior with a certain model, I need to manually change the behavior, select a model and If I have MCP's configured but not enabled I will need to enable them.

I will have to do all of this to start working, let's say if we have presets, I would just keep typing. ofcource we would usually need to have pre and post hooks in preset to start and stop MCP's.

ChetanKoneru avatar Sep 12 '25 01:09 ChetanKoneru

@CsBigDataHub you can have defaultModel for a behavior to auto select it, also you can disable tools for specific custom behavior making that automatic, all of that was done by @zikajk recently, and I believe he's idea was what this issue is about

ericdallo avatar Sep 12 '25 01:09 ericdallo

So AFAICS, after a behavior well configured, you can simply C-c C-b, select your behavior and keep typing, the model will change according to the defaultModel of that behavior, and the tools available as well

ericdallo avatar Sep 12 '25 01:09 ericdallo

Hi @ericdallo ,

Have you looked at these, we already support some of these feature. I though you might be interested.

https://docs.continue.dev/guides/plan-mode-guide https://docs.continue.dev/customize/models#recommended-models

ChetanKoneru avatar Nov 26 '25 00:11 ChetanKoneru