Skip to content

Add server selection UI for per-server LLM configuration - #5

Draft
franktheglock with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-per-server-llm-configuration
Draft

Add server selection UI for per-server LLM configuration#5
franktheglock with Copilot wants to merge 6 commits into
mainfrom
copilot/fix-per-server-llm-configuration

Conversation

Copilot AI commented Nov 5, 2025

Copy link
Copy Markdown
Contributor

The dashboard displayed all connected servers but always edited the first one's configuration. No UI existed to select which server to configure, making per-server LLM customization impossible despite backend support.

Changes

UI & Interaction

  • Made server items clickable with data-server-id attribute
  • Added .selected CSS class for visual feedback (blue border/background)
  • Display selected server name in configuration header: "LLM Configuration (Server Name)"
  • Added instructional text: "Click a server to view and edit its configuration"

JavaScript Logic

async function selectServer(serverId) {
    state.currentServerId = serverId;
    state.currentServerName = state.servers.find(s => s.id === serverId)?.name;
    
    // Update visual selection
    document.querySelectorAll('.server-item').forEach(item => {
        item.classList.toggle('selected', item.getAttribute('data-server-id') === serverId);
    });
    
    updateServerNameDisplay();
    await loadConfig();  // Fetch selected server's config
}

State Management

  • Added currentServerName and servers to state object
  • Persist selection across page refreshes
  • Default to first server if previous selection no longer exists

Screenshots

Gaming Community selected (OpenAI GPT-4):
Initial state

Dev Team selected (Anthropic Claude):
After switching

Testing

Added tests/test_server_config.py verifying:

  • Configuration isolation (updates to server A don't affect server B)
  • Each server can have independent provider/model/prompt/temperature
  • Database-level separation
Original prompt

This section details on the original issue you should resolve

<issue_title>per server llm configuration does not work</issue_title>
<issue_description>currently there is no way to configure what llm you use, the context window, and the system prompt per server the bot is in

by default updating the system prompt updates updates it in the sever DB, even though there is not a way to choose which server you are editing</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI self-assigned this Nov 5, 2025
Copilot AI and others added 5 commits November 5, 2025 04:50
- Add clickable server items with visual selection state
- Display selected server name in LLM Configuration header
- Add instructional text to Server Connections card
- Preserve server selection across refreshes
- Update configuration display when server selection changes

Co-authored-by: franktheglock <169854515+franktheglock@users.noreply.github.com>
- Verify each server can have independent LLM settings
- Test configuration updates don't affect other servers
- Validate database-level isolation
- All tests passing successfully

Co-authored-by: franktheglock <169854515+franktheglock@users.noreply.github.com>
- Add CSS classes for server instruction and selected server name
- Replace inline styles with proper CSS classes
- Use constants for test server IDs for better readability
- Improve code maintainability and consistency

Co-authored-by: franktheglock <169854515+franktheglock@users.noreply.github.com>
- Ensure test database is cleaned up even if test fails
- Prevents test artifacts from accumulating
- Improves test reliability and maintainability

Co-authored-by: franktheglock <169854515+franktheglock@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix per server LLM configuration issue Add server selection UI for per-server LLM configuration Nov 5, 2025
Copilot AI requested a review from franktheglock November 5, 2025 05:06
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.

per server llm configuration does not work

2 participants