[PR #13446] app: adding ability to persist unsent prompt across navigation #40084

Open
opened 2026-04-23 01:04:54 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13446
Author: @hoyyeva
Created: 12/12/2025
Status: 🔄 Open

Base: mainHead: hoyyeva/remember-unsent-prompt


📝 Commits (3)

  • 7d6f0c6 adding draft for each chat to remember unsent prompts
  • ed553f5 clean up
  • 42d6a3f proper clear draft message

📊 Changes

13 files changed (+211 additions, -14 deletions)

View changed files

📝 app/cmd/app/app.go (+3 -0)
📝 app/cmd/app/app_darwin.go (+5 -0)
📝 app/cmd/app/app_windows.go (+5 -0)
app/package-lock.json (+6 -0)
📝 app/store/database.go (+52 -6)
📝 app/store/store.go (+17 -0)
📝 app/ui/app/codegen/gotypes.gen.ts (+2 -0)
📝 app/ui/app/src/api.ts (+14 -0)
📝 app/ui/app/src/components/Chat.tsx (+1 -0)
📝 app/ui/app/src/components/ChatForm.tsx (+47 -4)
📝 app/ui/app/src/components/Settings.tsx (+2 -4)
app/ui/app/src/hooks/useDraftMessage.ts (+34 -0)
📝 app/ui/ui.go (+23 -0)

📄 Description

When users type unsent messages in the chat input and navigate to settings or other chats, the unsent text disappears.
Also when navigate back from settings page, it always goes to the new chat not the previous page.

This PR is resolving https://github.com/ollama/ollama/issues/12762

The PR implemented draft message persistence using the existing SQLite db, following the same patterns as other chat data such as message, attachments, and browser state. Drafts are automatically saved and restored when navigating between pages.


🔄 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/13446 **Author:** [@hoyyeva](https://github.com/hoyyeva) **Created:** 12/12/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `hoyyeva/remember-unsent-prompt` --- ### 📝 Commits (3) - [`7d6f0c6`](https://github.com/ollama/ollama/commit/7d6f0c621f6cf0024f9334df26185f13f1fa1aed) adding draft for each chat to remember unsent prompts - [`ed553f5`](https://github.com/ollama/ollama/commit/ed553f51f7d94845d3c4f4366827f25a79852fbc) clean up - [`42d6a3f`](https://github.com/ollama/ollama/commit/42d6a3f0753caa01b3b88b619f400e2f0005e4e4) proper clear draft message ### 📊 Changes **13 files changed** (+211 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `app/cmd/app/app.go` (+3 -0) 📝 `app/cmd/app/app_darwin.go` (+5 -0) 📝 `app/cmd/app/app_windows.go` (+5 -0) ➕ `app/package-lock.json` (+6 -0) 📝 `app/store/database.go` (+52 -6) 📝 `app/store/store.go` (+17 -0) 📝 `app/ui/app/codegen/gotypes.gen.ts` (+2 -0) 📝 `app/ui/app/src/api.ts` (+14 -0) 📝 `app/ui/app/src/components/Chat.tsx` (+1 -0) 📝 `app/ui/app/src/components/ChatForm.tsx` (+47 -4) 📝 `app/ui/app/src/components/Settings.tsx` (+2 -4) ➕ `app/ui/app/src/hooks/useDraftMessage.ts` (+34 -0) 📝 `app/ui/ui.go` (+23 -0) </details> ### 📄 Description When users type unsent messages in the chat input and navigate to settings or other chats, the unsent text disappears. Also when navigate back from settings page, it always goes to the new chat not the previous page. This PR is resolving https://github.com/ollama/ollama/issues/12762 The PR implemented draft message persistence using the existing SQLite db, following the same patterns as other chat data such as message, attachments, and browser state. Drafts are automatically saved and restored when navigating between pages. --- <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-23 01:04:54 -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#40084