[PR #6] [MERGED] Add workflow/chat history #7

Closed
opened 2026-02-16 04:15:05 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/template-workflow-document-qa/pull/6
Author: @adrianlyjak
Created: 9/23/2025
Status: Merged
Merged: 9/23/2025
Merged by: @adrianlyjak

Base: mainHead: adrian/hist


📝 Commits (10+)

📊 Changes

26 files changed (+2236 additions, -1196 deletions)

View changed files

📝 pyproject.toml.jinja (+2 -2)
📝 src/{{ project_name_snake }}/clients.py (+19 -5)
📝 src/{{ project_name_snake }}/qa_workflows.py (+129 -132)
📝 test-proj/pyproject.toml (+2 -2)
📝 test-proj/src/test_proj/clients.py (+19 -5)
📝 test-proj/src/test_proj/qa_workflows.py (+129 -132)
📝 test-proj/ui/index.html (+6 -0)
📝 test-proj/ui/package.json (+1 -0)
📝 test-proj/ui/src/App.tsx (+21 -0)
📝 test-proj/ui/src/components/ChatBot.tsx (+174 -431)
test-proj/ui/src/components/Sidebar.tsx (+181 -0)
test-proj/ui/src/libs/events.ts (+15 -0)
test-proj/ui/src/libs/useChatHistory.ts (+185 -0)
test-proj/ui/src/libs/useChatWorkflowHandler.ts (+69 -0)
test-proj/ui/src/libs/useChatbot.ts (+264 -0)
📝 test-proj/ui/src/pages/Home.tsx (+52 -28)
📝 ui/index.html (+6 -0)
📝 ui/package.json.jinja (+1 -0)
📝 ui/src/App.tsx (+21 -0)
📝 ui/src/components/ChatBot.tsx (+174 -431)

...and 6 more files

📄 Description

Adds session history

  • Session metadata is stored on the client in indexed db
  • Conversation history is stored in the workflow state
  • Adds a sidebar with timestamped conversation sessions

Updates the UI a bit to look better with the sidebar. Also adds dark/light mode detection

image

Future things that need fixing or improving:

  • Need to delete backend workflows when the frontend is deleted
  • Should synchronize and detect deleted conversations on the client, or alternately entirely query the workflows from the server (needs further features added to workflow server)
  • Should "sleep" inactive workflows to save resources on the server
  • The workflow list API is querying details of all the active workflows individually. Was noticing some potential bugs related to this with a lot of parallel requests. Reloading history was getting buggy

🔄 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/run-llama/template-workflow-document-qa/pull/6 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 9/23/2025 **Status:** ✅ Merged **Merged:** 9/23/2025 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `adrian/hist` --- ### 📝 Commits (10+) - [`3356a8f`](https://github.com/run-llama/template-workflow-document-qa/commit/3356a8f1d5a606395961ed57b2643ca5c879486c) wip hist - [`ee3dc11`](https://github.com/run-llama/template-workflow-document-qa/commit/ee3dc11d099ebe4566e8f2df59b6a8958c3c3ad3) guh - [`3fb646a`](https://github.com/run-llama/template-workflow-document-qa/commit/3fb646ae7908621143f3c802173c70a8b6bc7646) wip - [`35b4df4`](https://github.com/run-llama/template-workflow-document-qa/commit/35b4df4e6a2673ca5980bcd9f1eb82af9d125ec9) wip - [`d0f4a88`](https://github.com/run-llama/template-workflow-document-qa/commit/d0f4a882dd83d8868b544d12ff4827238c19275f) wip - [`58670a8`](https://github.com/run-llama/template-workflow-document-qa/commit/58670a86ce27ddcb7d8485220030c58034942023) functional, not pretty - [`3fdb64a`](https://github.com/run-llama/template-workflow-document-qa/commit/3fdb64a1723db265604fb932e1467b5a13d41c6a) wip - [`1ffe4a8`](https://github.com/run-llama/template-workflow-document-qa/commit/1ffe4a8044ce0f4301a0a3f322e08f6c487a7aa5) reformat - [`a79780e`](https://github.com/run-llama/template-workflow-document-qa/commit/a79780e8e0aa5c3cb43bf5c3d0c1beda17d2b105) wip - [`924a94d`](https://github.com/run-llama/template-workflow-document-qa/commit/924a94d5e72d392694f33420a19172ea8db96fc8) update template ### 📊 Changes **26 files changed** (+2236 additions, -1196 deletions) <details> <summary>View changed files</summary> 📝 `pyproject.toml.jinja` (+2 -2) 📝 `src/{{ project_name_snake }}/clients.py` (+19 -5) 📝 `src/{{ project_name_snake }}/qa_workflows.py` (+129 -132) 📝 `test-proj/pyproject.toml` (+2 -2) 📝 `test-proj/src/test_proj/clients.py` (+19 -5) 📝 `test-proj/src/test_proj/qa_workflows.py` (+129 -132) 📝 `test-proj/ui/index.html` (+6 -0) 📝 `test-proj/ui/package.json` (+1 -0) 📝 `test-proj/ui/src/App.tsx` (+21 -0) 📝 `test-proj/ui/src/components/ChatBot.tsx` (+174 -431) ➕ `test-proj/ui/src/components/Sidebar.tsx` (+181 -0) ➕ `test-proj/ui/src/libs/events.ts` (+15 -0) ➕ `test-proj/ui/src/libs/useChatHistory.ts` (+185 -0) ➕ `test-proj/ui/src/libs/useChatWorkflowHandler.ts` (+69 -0) ➕ `test-proj/ui/src/libs/useChatbot.ts` (+264 -0) 📝 `test-proj/ui/src/pages/Home.tsx` (+52 -28) 📝 `ui/index.html` (+6 -0) 📝 `ui/package.json.jinja` (+1 -0) 📝 `ui/src/App.tsx` (+21 -0) 📝 `ui/src/components/ChatBot.tsx` (+174 -431) _...and 6 more files_ </details> ### 📄 Description Adds session history - Session metadata is stored on the client in indexed db - Conversation history is stored in the workflow state - Adds a sidebar with timestamped conversation sessions Updates the UI a bit to look better with the sidebar. Also adds dark/light mode detection <img width="1450" height="952" alt="image" src="https://github.com/user-attachments/assets/a6d6c7de-dfde-4da9-8a09-346377f4e38e" /> Future things that need fixing or improving: - Need to delete backend workflows when the frontend is deleted - Should synchronize and detect deleted conversations on the client, or alternately entirely query the workflows from the server (needs further features added to workflow server) - Should "sleep" inactive workflows to save resources on the server - The workflow list API is querying details of all the active workflows individually. Was noticing some potential bugs related to this with a lot of parallel requests. Reloading history was getting buggy --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 04:15:05 -05:00
yindo closed this issue 2026-02-16 04:15:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/template-workflow-document-qa#7