Files
openobserve/web
Sai Nikhil ec2a9cc771 fix: o2 ai issues when enabled (#10291)
### **User description**
This PR fixes the issue in E: 1216 (1 & 3) , E: 1218 , along with append
the fields when sending to ai chat


___

### **PR Type**
Enhancement


___

### **Description**
- Add `appendMode` prop for AI Chat

- Auto-scroll input on append

- Propagate and clear chat context

- UI tweaks: widths, toggle styles, splitter


___

### Diagram Walkthrough


```mermaid
flowchart LR
  SP["ScheduledPipeline.vue"] -- "sendToAiChat(value,append)" --> O2AIChat
  ML["MainLayout.vue"] -- "sendToAiChat(value,append)" --> O2AIChat
  O2AIChat["O2AIChat.vue"] --> AM["appendMode prop"]
  AM -- "true" --> APPEND["append input with separator"]
  AM -- "false" --> REPLACE["replace input"]
  APPEND --> SCROLL["scrollInputToBottom()"]
```



<details> <summary><h3> File Walkthrough</h3></summary>

<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Enhancement</strong></td><td><details><summary>10
files</summary><table>
<tr>
<td><strong>O2AIChat.vue</strong><dd><code>Add `appendMode` prop and
scroll input enhancements</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-a6a125719a7b32b31b53fcfe05c12081d82c139a401699affdda0db8e73887e3">+47/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>ScheduledPipeline.vue</strong><dd><code>Propagate
`appendMode` and update sendToAiChat signature</code>&nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-63d8f838bb880356e7804b4a57fd9223d4f2c189de7aadc7cf33cba723b29aaf">+10/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>MainLayout.vue</strong><dd><code>Bind `appendMode` and clear
context after send</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-91e4134141264c4624d4eb4cfa987b33ed31eb6f551e089c0b26f2610dd54362">+13/-3</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>DetailTable.vue</strong><dd><code>Update sendToAiChat to
accept `append` parameter</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-80552b5d25fa6cef9fbbe430b1865d761c4b132284c2d2175afceea8cbabc8c7">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>Index.vue</strong><dd><code>Adjust splitter when AI chat
opens or closes</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-0323c3da69b369843c5d72bf4df5b00ca6b5147192a213baf331659ecf92af62">+21/-2</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>JsonPreview.vue</strong><dd><code>Extend sendToAiChat
signature with `append`</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-3985073134d35ff074742944b114d0905524038b42e6d2ac887fef2c8436fb16">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>SearchBar.vue</strong><dd><code>Add toggle CSS class and
dynamic width style</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-81893de4edf186b0556f610acb280c87baa2ffe67d3b48a60a866094c7635baf">+10/-1</a>&nbsp;
&nbsp; </td>

</tr>

<tr>
<td><strong>SearchResult.vue</strong><dd><code>Add `append` flag to
sendToAiChat emit</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-5e65533aa4754bb6d0074fda18ffc1ecacded3b9ca6bc28a161c3f6b12f20195">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>TenstackTable.vue</strong><dd><code>Tweak AI button position
and append flag support</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-bc3c669f5ab65a42ae378df1f7d6b35014c9c220790bdcc72b47f55d1385dc22">+5/-5</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>

<tr>
<td><strong>Functions.vue</strong><dd><code>Modify sendToAiChat to
include `append` argument</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; </dd></td>
<td><a
href="https://github.com/openobserve/openobserve/pull/10291/files#diff-ad825ec1b8d58aec9bf5d2553ea09394a30b22ac59d708bcf9e56168ca1daaf6">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></details></td></tr></tr></tbody></table>

</details>

___
2026-01-30 20:06:25 +05:30
..
2023-02-02 09:03:11 +05:30
2025-12-04 13:58:09 +05:30
2023-08-06 01:29:13 +08:00
2023-02-02 09:03:11 +05:30
2023-02-02 09:03:11 +05:30
2024-04-03 12:49:25 +05:30

web

This template should help get you started developing with Vue 3 in Vite.

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:

  1. Disable the built-in TypeScript Extension
    1. Run Extensions: Show Built-in Extensions from VSCode's command palette
    2. Find TypeScript and JavaScript Language Features, right click and select Disable (Workspace)
  2. Reload the VSCode window by running Developer: Reload Window from 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