bamaer opened a new issue, #8757:
URL: https://github.com/apache/hop/issues/8757
### What needs to happen?
The AI Assistant (#8330) gives us a good base: pluggable advisors and
providers, a review step before changes are applied, undoable graph edits, and
off by default. Ada (@Adalennis) tested it in depth, and together with a code
walkthrough that produced the list below. This issue groups the follow-up work
so we can pick it up in small PRs, one section or item at a time.
The first section is the most urgent: it covers broken saves, data being
sent, and the main follow-up flow.
### 1. Fix first
- [ ] AI Provider loses its type when an existing provider is saved
(`"provider": {"null": {}}`), and the file then fails to load.
`AiProviderObjectFactory.createObject()` should set the plugin id and name, as
`DatabaseMetaObjectFactory` does. Files already saved this way should still
load so the type can be picked again.
- [ ] Follow-up turns skip the summary, XML, log and catalog even when they
are checked (`includeFull = !followUp`). A log from a new run should always be
sent, so "run, fails, ask why" works. Reopening AI Help at pipeline level
should clear the earlier focus transform.
- [ ] Mask secrets based on `@HopMetadataProperty(password = true)` instead
of field names, and scrub `Encrypted …` values and `user:pass@` URLs. Many
fields and XML tags are currently not caught (`secretKey`, `storageAccountKey`,
`privateKeyPassphrase`, `<httpPassword>`, …).
- [ ] Make the Sharing line show exactly what is sent:
- full XML only when the global option is also on
- first-turn-only items on follow-ups
- the focus transform XML, which is currently always sent
- [ ] Match sessions on the pipeline or workflow itself, not its name.
Saving a new pipeline currently splits the history, and two pipelines with the
same name share one conversation.
- [ ] Ctrl/Cmd+Shift+A (and +C) don't fire while a text field has focus:
`HopGuiKeyHandler.isNativeTextEditingKey()` ignores Shift.
### 2. Context and prompts
- [ ] Add context size and max output tokens to AI Provider. Ollama's
`num_ctx` defaults to 4096, and the first turn can already exceed it.
- [ ] Estimate the prompt size before sending, make the plugin catalog
compact (it is cut off at 180 entries), and include key transform settings in
the structure sent to the model.
- [ ] Prompts:
- answer in the user's language
- don't refer to "the provided JSON"
- only emit `hop_proposals` when a change is asked for
- [ ] Use structured output where providers support it, and validate
proposals against a schema.
- [ ] Add a small evaluation set with real models (one small Ollama model,
one hosted) for checking prompt changes.
### 3. Proposals and data safety
- [ ] `SAVE_METADATA`: limit the metadata types it can save, confirm before
overwriting, and make it undoable.
- [ ] Don't pre-check risky proposals in the review dialog, and apply a
batch all-or-nothing.
- [ ] Present pipeline XML, logs and metadata to the model as data, not
instructions, and make loading `AGENTS.md` opt-in.
- [ ] Optional: a preview of the actual payload, and an "All" button in the
metadata picker.
### 4. Sessions
- [ ] Scope sessions to the project.
- [ ] "+" picks up the active pipeline or workflow. Add a "bind to active
pipeline/workflow" action, and only offer advisors that can work in the session.
- [ ] Remember the last used provider.
- [ ] Confirm before deleting a session that has turns, and cancel a running
request on delete or close. Today closing the window during a request leaves
the session "working".
- [ ] Snapshot the pipeline on the UI thread before the background work, so
`getXml()` doesn't run on a pipeline the user is editing.
- [ ] Release `PipelineMeta`/graph references and key-handler registrations
when views or tabs close.
### 5. Window and provider editor
- [ ] Use one name in the UI and docs (Assistant, Advisor, Advisory and AI
Help are all in use), and move the remaining hardcoded strings to i18n.
- [ ] Empty states:
- explain why the question field is disabled
- show how to start a session bound to a pipeline
- give feedback when Send can't run
- [ ] Float and dock should move the session and close the original view,
and the button for the current view should be disabled.
- [ ] Show the focus transform in the header.
- [ ] Layout:
- narrower Sessions panel
- no gap under the collapsed Sharing line
- a minimum height for the transcript in the dock
- [ ] Make the "?" icon open the docs, or move its hint into the placeholder.
- [ ] Provider editor:
- Models per role: explain the table, fill the Model column from Refresh
models, and make it clear that a CHAT row overrides Model name.
- Use the standard grouped `GuiCompositeWidgets` layout, which fixes the
label columns, the empty area, the clipped variable icons and OK overlapping
Help.
- [ ] Show clear messages when a provider can't be found or loaded, instead
of `null` or a stack trace.
- [ ] Add SWTBot tests for the window.
### 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]