Repository navigation
Commit 2a8eff5
authored
ADFA-6281 | Share AI prompt template engine and pane helpers (#2087)
* feat(plugin-api): ADFA-6281 share AI prompt engine and pane helpers
Host-side template engine, generic YAML config loader/store and UI
helpers, consumed by AI-Core and the Gemini, Local, OpenAI and MCP
agents in plugin-examples. ABI-additive.
Prompt config:
- Include paths refuse a backslash and ':', which a Windows host would read as a separator or a drive.
- Any IOException from a source is reported as a PromptConfigException naming the file.
- Duplicate keys are refused explicitly; already SnakeYAML Engine's default, stated so an upgrade cannot flip it.
- Config text keeps its whitespace as YAML parsed it, so `|` keeps its final newline and `|-` drops it.
- PromptConfigStore treats a load that completed with an exception as failed: preload() retries it and configIfLoaded() returns null rather than calling getCompleted().
Template engine:
- Names may be in any case and hold dots ({{fileName}}, {{item.name}}), looked up as the whole key.
Pane helpers:
- SecretRevealController keeps the user's selection across a toggle, does not report legibility from attach(), is @mainthread, and waits for the redraw via postOnAnimation.
- applyPaneStyling does not recurse into a styled control's children.
* fix(plugin-api): ADFA-6281 address review on prompt engine and pane helpers
Accept padded tags and reject malformed ones, re-mask on reattach, floor changelog at 26.41.
* feat(plugin-api): ADFA-6281 add WebSearchBackend for live web search capability
Backends implement canSearchWeb() so ai-core offers web_search only when a search would run.
* feat(plugin-api): ADFA-6281 add PromptConfigStore.reload
Owns the load scope and reports load/failure, so plugins drop their copied lifecycle code.
* fix(plugin-api): ADFA-6281 address second review round
- PromptConfigStore.reload: catch and log a throwing callback instead of
letting it reach the uncaught handler; document the callback thread;
serialize reload and clear.
- PromptTemplateEngine: `{{{{` renders a literal `{{`.
- SecretRevealController: onLegibleChanged KDoc covers re-attach.
- LlmInferenceService: list WebSearchBackend among the capabilities.
* feat(plugin-api): define web_search and required_tool extraParams keys
Refs: ADFA-62811 parent 2c09a2c commit 2a8eff5
22 files changed
Lines changed: 2177 additions & 4 deletions
File tree
- app
- docs
- gradle
- plugin-api
- api
- src
- main
- java/com/itsaky/androidide/plugins/services
- kotlin/com/itsaky/androidide/plugins/ai
- prompt
- ui
- test/kotlin/com/itsaky/androidide/plugins/ai/prompt
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| 259 | + | |
259 | 260 | | |
260 | 261 | | |
261 | 262 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
39 | 73 | | |
40 | 74 | | |
41 | 75 | | |
| |||
50 | 84 | | |
51 | 85 | | |
52 | 86 | | |
53 | | - | |
| 87 | + | |
| 88 | + | |
54 | 89 | | |
55 | 90 | | |
56 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| 302 | + | |
| 303 | + | |
302 | 304 | | |
303 | 305 | | |
304 | 306 | | |
| |||
0 commit comments