You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add default model configuration for chat sessions (#18)
Closes#17
Implements the ability to configure default models for chat sessions
using `infer config set-model <MODEL_NAME>`. When a default model is
configured, the chat command skips the model selection view and uses the
configured model directly.
## Changes
- Add ChatConfig struct with default_model field
- Implement `infer config set-model` command to set default model
- Modify chat command to skip model selection when default is set
- Update chat application to start in chat view when default model is
configured
- Add comprehensive documentation with usage examples
- Refactor complex nested blocks to pass linter checks
## Testing
- All existing tests pass
- Linting passes without issues
- Manual testing confirms feature works as expected
Generated with [Claude Code](https://claude.ai/code)
---------
Signed-off-by: Eden Reich <[email protected]>
Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Eden Reich <[email protected]>
- The project uses modern Go project structure with `internal/` for private packages
185
+
- Default model configuration allows skipping model selection in chat sessions when a preferred model is set
186
+
187
+
## Usage Examples
188
+
189
+
### Setting a Default Model
190
+
```bash
191
+
# Set a default model for chat sessions
192
+
infer config set-model gpt-4-turbo
193
+
194
+
# Now chat will automatically use this model without showing selection
195
+
infer chat
196
+
```
197
+
198
+
### Configuration Management
199
+
```bash
200
+
# View current configuration (check .infer/config.yaml)
201
+
cat .infer/config.yaml
202
+
203
+
# The default model will be saved in the chat section:
204
+
# chat:
205
+
# default_model: "gpt-4-turbo"
206
+
```
181
207
182
208
## Code Style Guidelines
183
209
184
-
- **No Redundant Comments**: The codebase has been cleaned of redundant inline comments. Avoid adding comments that simply restate what the code does or explain obvious operations.
210
+
- **Inline Comments**: Do not write inline comments unless the code is genuinely unclear or requires specific explanation.
185
211
- **Comment Policy**: Only add comments for:
186
212
- Complex business logic that isn't immediately clear
187
213
- External API interactions or protocol specifications
0 commit comments