Skip to content

Commit cc98503

Browse files
feat: Add model visibility in chat UI and enhanced export format (#15)
## Summary Implements model visibility and export enhancements requested in #12. ## Changes - ✅ Add selected model display in lower-right corner of input field - ✅ Update export format to track which model generated each response - ✅ Support for switching models mid-conversation with proper attribution ## Technical Implementation - Added `ConversationEntry` structure for message+model tracking - Enhanced UI to show current model in input area - Updated `/compact` export to include model info per response - Enhanced `/switch` command to update UI immediately Resolves #12 🤖 Generated with [Claude Code](https://claude.ai/code) --------- Signed-off-by: Eden Reich <eden.reich@gmail.com> Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com> Co-authored-by: Eden Reich <edenreich@users.noreply.github.com>
1 parent 533b198 commit cc98503

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5444
-4801
lines changed

.pre-commit-config.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,12 @@ repos:
1717
rev: v2.3.1
1818
hooks:
1919
- id: golangci-lint
20+
21+
- repo: local
22+
hooks:
23+
- id: mod-tidy
24+
name: Go mod tidy
25+
entry: flox activate -- task mod:tidy
26+
language: system
27+
files: '(go\.mod|go\.sum)$'
28+
pass_filenames: false

CLAUDE.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
This is the Inference Gateway CLI (`infer`), a Go-based command-line tool for managing and interacting with machine learning inference services. The CLI provides functionality for model deployment, status monitoring, prompt testing, and configuration management.
7+
This is the Inference Gateway CLI (`infer`), a Go-based command-line tool for managing and interacting with machine learning inference services. The CLI provides functionality for status monitoring, interactive chat, and configuration management.
88

99
## Development Commands
1010

@@ -100,15 +100,23 @@ flox activate -- task --list
100100

101101
## Architecture
102102

103-
The project follows the standard Go CLI architecture using Cobra framework:
103+
The project follows a modern SOLID architecture using Bubble Tea for the TUI and dependency injection:
104104

105105
- `main.go`: Entry point that calls `cmd.Execute()`
106106
- `cmd/`: Contains all CLI command implementations using Cobra
107107
- `root.go`: Root command setup with global flags (`--config`, `--verbose`)
108-
- `status.go`: Status monitoring (`infer status`, `infer models list`)
109-
- `prompt.go`: Prompt testing (`infer prompt`)
108+
- `init.go`: Project initialization (`infer init`)
109+
- `status.go`: Status monitoring (`infer status`)
110+
- `chat.go`: Interactive chat (`infer chat`)
110111
- `version.go`: Version information (`infer version`)
111112
- `config/config.go`: Configuration management with YAML support
113+
- `internal/`: Internal application architecture
114+
- `app/`: Application layer with Bubble Tea models
115+
- `handlers/`: Request handlers and routing
116+
- `services/`: Business logic services
117+
- `ui/`: UI components and interfaces
118+
- `domain/`: Domain models and interfaces
119+
- `container/`: Dependency injection container
112120

113121
### Configuration System
114122
The CLI uses a project-based YAML configuration file at `.infer/config.yaml` in the current directory with the following structure:
@@ -151,27 +159,23 @@ compact:
151159
- Global flags: `--config`, `--verbose`
152160
- Subcommands:
153161
- `init [--overwrite]`: Initialize local project configuration
154-
- `status [--format]`: Gateway status
155-
- `list`: List deployed models
156-
- `prompt <text>`: Send prompts to models
157-
- `chat`: Interactive chat with model selection and tool support
158-
- `/compact`: Export conversation to markdown file
159-
- `tools`: Tool management and execution
160-
- `safety enable/disable/status`: Manage safety approval settings
162+
- `status`: Gateway status
163+
- `chat`: Interactive chat with model selection
161164
- `version`: Version information
162165

163166
## Dependencies
164167

165168
- **Cobra** (`github.com/spf13/cobra`): CLI framework for command structure
169+
- **Bubble Tea** (`github.com/charmbracelet/bubbletea`): TUI framework for interactive chat
166170
- **YAML v3** (`gopkg.in/yaml.v3`): Configuration file parsing
167171
- Go 1.24+ required
168172

169173
## Implementation Notes
170174

171-
- All commands currently contain placeholder implementations with mock outputs
172-
- The actual inference gateway communication logic is not yet implemented (marked as TODO)
175+
- The chat command uses Bubble Tea for interactive TUI experience
176+
- Architecture follows SOLID principles with dependency injection
173177
- Configuration loading handles missing config files gracefully by returning defaults
174-
- The project uses standard Go project structure with `internal/` for private packages
178+
- The project uses modern Go project structure with `internal/` for private packages
175179

176180
## Code Style Guidelines
177181

0 commit comments

Comments
 (0)