[PR #14326] app/store: clear GUI chat history when OLLAMA_GUI_NOHISTORY is set #45869

Open
opened 2026-04-25 01:28:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/14326
Author: @samanebi
Created: 2/19/2026
Status: 🔄 Open

Base: mainHead: main


📝 Commits (2)

  • f4398c8 app/store: clear GUI chat history when OLLAMA_GUI_NOHISTORY is set
  • a2707e2 app/store: implement more tests

📊 Changes

6 files changed (+902 additions, -0 deletions)

View changed files

📝 app/store/database.go (+13 -0)
📝 app/store/database_test.go (+39 -0)
📝 app/store/store.go (+41 -0)
📝 app/store/store_test.go (+803 -0)
📝 app/ui/ui.go (+3 -0)
📝 envconfig/config.go (+3 -0)

📄 Description

Summary

Implements OLLAMA_GUI_NOHISTORY support in the GUI (#14313).

Problem

The GUI stores chat history and attachments in SQLite, and these persist across sessions. In environments where logging must be disabled (compliance, shared machines, etc.), there is no way to prevent chat data from being written to disk. The existing OLLAMA_NOHISTORY variable only affects CLI readline history, not the GUI.

Solution

Add a new environment variable OLLAMA_GUI_NOHISTORY that clears GUI chat history and cached images at three points:

  • When the app starts
  • When the app closes
  • When the user starts a new chat

This keeps OLLAMA_NOHISTORY for CLI behavior and introduces a separate flag for the GUI, per the issue discussion.

How to use

Set the environment variable before launching the Ollama app:

export OLLAMA_GUI_NOHISTORY=1


🔄 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/14326 **Author:** [@samanebi](https://github.com/samanebi) **Created:** 2/19/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (2) - [`f4398c8`](https://github.com/ollama/ollama/commit/f4398c811a51dc363c4433797d70ceb3fd74a457) app/store: clear GUI chat history when OLLAMA_GUI_NOHISTORY is set - [`a2707e2`](https://github.com/ollama/ollama/commit/a2707e282798da43214e64e4011a80d9288b503e) app/store: implement more tests ### 📊 Changes **6 files changed** (+902 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `app/store/database.go` (+13 -0) 📝 `app/store/database_test.go` (+39 -0) 📝 `app/store/store.go` (+41 -0) 📝 `app/store/store_test.go` (+803 -0) 📝 `app/ui/ui.go` (+3 -0) 📝 `envconfig/config.go` (+3 -0) </details> ### 📄 Description ## Summary Implements OLLAMA_GUI_NOHISTORY support in the GUI (#14313). ## Problem The GUI stores chat history and attachments in SQLite, and these persist across sessions. In environments where logging must be disabled (compliance, shared machines, etc.), there is no way to prevent chat data from being written to disk. The existing `OLLAMA_NOHISTORY` variable only affects CLI readline history, not the GUI. ## Solution Add a new environment variable `OLLAMA_GUI_NOHISTORY` that clears GUI chat history and cached images at three points: - When the app starts - When the app closes - When the user starts a new chat This keeps `OLLAMA_NOHISTORY` for CLI behavior and introduces a separate flag for the GUI, per the issue discussion. ## How to use Set the environment variable before launching the Ollama app: export OLLAMA_GUI_NOHISTORY=1 --- <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-25 01:28:58 -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#45869