bamaer opened a new issue, #8860:
URL: https://github.com/apache/hop/issues/8860
### What needs to happen?
Additional hardening items for the AI Assistant, found during testing
(macOS, Ollama provider).
## Behaviour
- [ ] **Cmd+Z in the question field undoes the pipeline.** In the question
field (tested in the bottom dock), Cmd+Z does not undo the typing. It reaches
the global Edit → Undo and reverts the last change on the active pipeline (a
moved transform jumps back).
- [ ] **Sending in an unlinked session.** When the session's pipeline is
closed, the question is added to the conversation and the "not linked" error
shows three times: in the transcript, in the status line and in an ErrorDialog
with a stack trace. After a restart every saved session is unlinked, so users
run into this.
- Fix: in `AiAdvisorSessionPane.send()`, check `session.getArtifact() ==
null` next to the provider and advisor checks, show `AiAdvisor.Status.NotBound`
once in the status line, and return before `session.addTurn()`. Change the four
NotLinked throws (pipeline and workflow context builders and advisors) to
`AiUserException`, so a late failure never opens a dialog.
- Optional: mark unlinked sessions in the tree (grey or "(closed)"). Ask
for confirmation when Link would attach a session to a different file than the
one it was started on.
- [ ] **Context size too small.** With a small Context size (e.g. 2000),
every question is stopped before sending, which is correct. The question is
still added to the conversation, though, and the error shows twice (transcript
and status line). The advice to uncheck Sharing items cannot help: the fixed
part alone (system message plus the basics, about 4.5k tokens) is already over
2000. The message should say to raise Context size when even the minimum does
not fit.
- [ ] **The assistant can be open three times at once.** From the AI
Assistant perspective, Float and Dock open the other view without leaving the
perspective. Tools → AI Assistant window always opens a floating window, even
when the dock is already open.
- [ ] **Cmd+Shift+A.** On macOS the shortcut opens the AI Assistant
perspective with the last active session. It does not link the pipeline or
workflow it was pressed from, as the canvas toolbar button does.
- [ ] **"Enable the AI Assistant" off.** Even after restarting Hop GUI, the
assistant still opens from the perspective, the Tools menu, the canvas button
and the shortcut, and looks fully enabled. Only Send is blocked, while the
tooltip says the assistant is hidden.
- [ ] **Canvas button vs context menu.** The canvas toolbar's AI Assistant
button always opens the whole pipeline, even when exactly one transform is
selected. Only the transform's context menu sets the focus. If this is
intended, the context menu entry could say "Ask the AI Assistant about this
transform" (it currently says "about this pipeline"). If not, the toolbar
button could focus the transform when exactly one is selected.
- [ ] **Assistant dropdown.** With the built-in assistants, the dropdown
never offers a real choice. A linked session shows only the assistant for its
file type. An unlinked session shows both, but neither works until the session
is linked, and linking replaces the choice anyway. The dropdown could show as
plain text or be disabled until a session has more than one applicable
assistant.
- [ ] **Session title after save.** After a new pipeline is saved, its
session keeps the title "New pipeline" until AI Assistant is clicked on the
pipeline toolbar again. It could take the file name on save.
## Settings
- [ ] **Default AI provider across projects.** The Default AI provider is a
global setting (`hop-config.json`), while AI Providers are project metadata.
After switching projects the setting shows a provider name that does not exist
in that project, with no warning; sessions fall back to the last-used provider.
- [ ] **Stale provider list.** In Configuration → AI Assistant, switching
projects while the view is open leaves the previous project's providers in the
Default AI provider dropdown.
- [ ] **No way to restore the default Extra context.** Once Extra context is
cleared or edited, the default notes cannot be restored from the UI. An empty
field is saved as `"extraContext": "\n"` and kept after a restart; the only way
back is removing the key from `hop-config.json`. A "Restore default" button
would fix this.
- [ ] **hop-conf options.** `hop-conf` has a `--hop-ai-...` option for every
AI Assistant setting except Extra context and Context files, so those two
cannot be set from the command line.
- [ ] **Context files guidance.** Only the tooltip says the field takes one
path per line, and there is no browse button. A placeholder such as
`${PROJECT_HOME}/ai-assistant.md` would make it clear.
## Prompt size and content
- [ ] **Duplicated notes.** The default Extra context ("Extra notes")
repeats almost word for word what the plugin's `ai-context.md` already contains
(case-sensitive names, run configuration types, don't guess names, `${NAME}`,
Hop vs Kettle terms). About 300 tokens are sent twice with every question. The
default Extra context could be empty, or hold only what the plugin notes do not
cover.
- [ ] **Proposal schema on every question.** About 2.5k of the 3.3k-token
system message is the `hop_proposals` schema and rules. They are sent even for
explain or diagnose questions, where the rules themselves say no proposals
should be made. They could be left out unless the question asks for a change.
- [ ] **"The basics" are heavy.** The metadata type list and the database
plugin list add about 1k tokens to every question, even when it has nothing to
do with metadata or databases. They could become Sharing options, or be sent
only when relevant.
- [ ] **Unused and default content.**
- A pipeline session also gets the workflow proposal types and parameter
reference, and a workflow session gets the pipeline ones: about 400 tokens it
cannot use.
- Transform settings include default values (e.g. the Pipeline executor's
14 `execution_*_field` names). Sending only non-default settings would cut
noise.
- `ai-context.md` is indented 4 spaces, so markdown renders its notes as a
code block.
- [ ] **Local paths.** The summary and log include full local paths
(`/Users/<name>/...`), which go to the provider unchanged. Fine for Ollama, but
worth noting for hosted providers.
## Secret masking
- [ ] Masking misses URL credentials in selected metadata. A Manual URL
`https://user:[email protected]/api` is sent as `"https:\/\/user:pass@..."`
because the JSON escapes `/`.
- [ ] It masks the boolean `sshTunnelUsePrivateKey` because of its name.
- [ ] Also check `sftp://user:pass@host/file.csv` in a Text file input, and
`?password=abc&format=json` in a URL, where `SECRET_KEY_VALUE` may swallow the
following parameters and the closing quote.
## Visual
- [ ] **Send button cut off.** The button is taller than the question field
and centred on it, so its bottom border is cut off. Aligning it to the bottom
of the field would fix it.
- [ ] **Checkbox padding.** In "Select metadata to include", the checkboxes
sit right against the tree's left border. A few pixels of left padding would
separate them from the frame, like the other trees and tables in Hop.
- [ ] **Misaligned variable icons.** The variable icons of Extra context and
Context files sit at the top right, outside their fields, and out of line with
the Default AI provider's icon.
- [ ] **Bottom dock zoom buttons.** The zoom buttons (+, −, 100%) only
resize terminal fonts but stay visible on every tab, so on the AI Assistant,
Search, Database or VFS tabs they do nothing.
### Issue Priority
Priority: 2
### Issue Component
Component: Hop Gui
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]