[PR #15297] Codex/first contribution #77400

Open
opened 2026-05-05 10:04:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/15297
Author: @Akshatkasera
Created: 4/3/2026
Status: 🔄 Open

Base: mainHead: codex/first-contribution


📝 Commits (2)

  • 508218f app: avoid sidebar opening animation on load
  • 87e2d23 cmd: validate think level in interactive CLI

📊 Changes

3 files changed (+119 additions, -19 deletions)

View changed files

app/ui/app/src/components/layout/layout.test.ts (+34 -0)
📝 app/ui/app/src/components/layout/layout.tsx (+81 -16)
📝 cmd/interactive.go (+4 -3)

📄 Description

cmd: validate think level in interactive CLI

Summary

  • Added client-side validation for the /think level in interactive mode
  • Invalid levels (e.g., /think banana) now show an error message instead of being silently accepted
  • Valid levels are: high, medium, low
  • Uses the existing ThinkValue.IsValid() method from api/types.go

Resolves the TODO at cmd/interactive.go:306 (added by @drifkin)

Test plan

  • Run ollama run <model> to enter interactive mode
  • Type /think high → should succeed with "Set 'think' mode to 'high'."
  • Type /think banana → should print: Invalid think level "banana". Valid levels are: high, medium, low
  • Type /think → should succeed with "Set 'think' mode."

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/15297 **Author:** [@Akshatkasera](https://github.com/Akshatkasera) **Created:** 4/3/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `codex/first-contribution` --- ### 📝 Commits (2) - [`508218f`](https://github.com/ollama/ollama/commit/508218f4e522fec4b1db51e909e7d5d41eebf365) app: avoid sidebar opening animation on load - [`87e2d23`](https://github.com/ollama/ollama/commit/87e2d23e65f4426274643c401ae6cd0ca57cb32d) cmd: validate think level in interactive CLI ### 📊 Changes **3 files changed** (+119 additions, -19 deletions) <details> <summary>View changed files</summary> ➕ `app/ui/app/src/components/layout/layout.test.ts` (+34 -0) 📝 `app/ui/app/src/components/layout/layout.tsx` (+81 -16) 📝 `cmd/interactive.go` (+4 -3) </details> ### 📄 Description cmd: validate think level in interactive CLI ## Summary - Added client-side validation for the `/think` level in interactive mode - Invalid levels (e.g., `/think banana`) now show an error message instead of being silently accepted - Valid levels are: `high`, `medium`, `low` - Uses the existing `ThinkValue.IsValid()` method from `api/types.go` Resolves the TODO at `cmd/interactive.go:306` (added by @drifkin) ## Test plan - Run `ollama run <model>` to enter interactive mode - Type `/think high` → should succeed with "Set 'think' mode to 'high'." - Type `/think banana` → should print: `Invalid think level "banana". Valid levels are: high, medium, low` - Type `/think` → should succeed with "Set 'think' mode." --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-05 10:04:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#77400