### **User description** 1. This PR added beta text to o2 ai 2. added search history functionality to the chat history 3. added clearing of history functionality so here it will delete the history that was stored in indexDB if it reaches 100 so it will delete the old history 4. now we only show top 100 history to the users. ___ ### **PR Type** Enhancement ___ ### **Description** - Add "Beta" label to O2 AI chat header - Introduce searchable chat history menu - Limit history to latest 100 entries - Auto-delete excess history from IndexedDB ___ ### **Changes diagram** ```mermaid flowchart LR A["User clicks history icon"] --> B["Load history from IndexedDB"] B --> C["Trim history to 100 entries"] C --> D["Delete older entries in DB"] D --> E["Assign to chatHistory.value"] E --> F["Show history menu"] F --> G["Filter via search input"] G --> H["Display filteredChatHistory"] ``` ___ ### **Changes walkthrough** 📝 <table><thead><tr><th></th><th align="left">Relevant files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><table> <tr> <td> <details> <summary><strong>O2AIChat.vue</strong><dd><code>Chat component UI enhancements</code> </dd></summary> <hr> web/src/components/O2AIChat.vue <li>Added "Beta" badge next to O2 AI title<br> <li> Replaced static history list with search-enabled menu<br> <li> Limited history to top 100 items and auto-deletion<br> <li> Defined <code>historySearchTerm</code> and <code>filteredChatHistory</code> computed<br> <li> Added CSS classes for beta badge and history menu layout </details> </td> <td><a href="https://github.com/openobserve/openobserve/pull/7397/files#diff-a6a125719a7b32b31b53fcfe05c12081d82c139a401699affdda0db8e73887e3">+133/-25</a></td> </tr> </table></td></tr></tr></tbody></table> ___ > <details> <summary> Need help?</summary><li>Type <code>/help how to ...</code> in the comments thread for any questions about PR-Agent usage.</li><li>Check out the <a href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a> for more information.</li></details>
web
This template should help get you started developing with Vue 3 in Vite.
Recommended IDE Setup
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
Type Support for .vue Imports in TS
TypeScript cannot handle type information for .vue imports by default, so we replace the tsc CLI with vue-tsc for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensionsfrom VSCode's command palette - Find
TypeScript and JavaScript Language Features, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Windowfrom the command palette.
Customize configuration
See Vite Configuration Reference.
Project Setup
npm install
Compile and Hot-Reload for Development
For stand-alone UI development environment, create .env file and which contains below environment variable
VITE_OPENOBSERVE_ENDPOINT=http://localhost:5080/
npm run dev
Type-Check, Compile and Minify for Production
npm run build
Run Unit Tests with Vitest
npm run test:unit
Run End-to-End Tests with Cypress
npm run test:e2e:dev
This runs the end-to-end tests against the Vite development server. It is much faster than the production build.
But it's still recommended to test the production build with test:e2e before deploying (e.g. in CI environments):
npm run build
npm run test:e2e
Lint with ESLint
npm run lint