[PR #8197] fix: only add to history if different #43909

Open
opened 2026-04-24 23:28:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/8197
Author: @mxyng
Created: 12/21/2024
Status: 🔄 Open

Base: mainHead: mxyng/cmd-history


📝 Commits (2)

  • 7ccdc98 fix: only add to history of different
  • a1d90e6 chore: clean up readline package

📊 Changes

3 files changed (+194 additions, -255 deletions)

View changed files

📝 readline/buffer.go (+145 -166)
📝 readline/history.go (+47 -75)
📝 readline/readline.go (+2 -14)

📄 Description

if the last item in history is the same as the one being added, skip it. this reduces the number of history entries. the behaviour is similar to how most shells maintain history


🔄 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/8197 **Author:** [@mxyng](https://github.com/mxyng) **Created:** 12/21/2024 **Status:** 🔄 Open **Base:** `main` ← **Head:** `mxyng/cmd-history` --- ### 📝 Commits (2) - [`7ccdc98`](https://github.com/ollama/ollama/commit/7ccdc98a5f7d3dfc4a1fe82efa08c206008c81e1) fix: only add to history of different - [`a1d90e6`](https://github.com/ollama/ollama/commit/a1d90e68d07272fd377e819e3a644952eb2903ae) chore: clean up readline package ### 📊 Changes **3 files changed** (+194 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `readline/buffer.go` (+145 -166) 📝 `readline/history.go` (+47 -75) 📝 `readline/readline.go` (+2 -14) </details> ### 📄 Description if the last item in history is the same as the one being added, skip it. this reduces the number of history entries. the behaviour is similar to how most shells maintain history --- <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-04-24 23:28:05 -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#43909