feat: SystemAiStatus + AskAi RPCs (v0.4.0)
`HubClient.systemAiStatus()` reports whether the hub-internal LLM hook is configured and which provider / privacy mode is active. `HubClient.askAi(prompt)` issues a one-shot prompt and returns the answer or a structured error kind so the UI can map each failure to its inline-fix copy. LoggedEvent gains `detail` upstream (no SDK change required). Signed-off-by: flemming-it <stefan.a.flemming@googlemail.com>
This commit is contained in:
parent
73dbdc16ef
commit
f0db42264f
5 changed files with 358 additions and 1 deletions
|
|
@ -44,6 +44,8 @@ typedef VerifyEventChainResponse = pb.VerifyEventChainResponse;
|
|||
typedef CheckUpdateResponse = pb.CheckUpdateResponse;
|
||||
typedef ChannelStatusResponse = pb.ChannelStatusResponse;
|
||||
typedef ChannelEntry = pb.ChannelEntry;
|
||||
typedef SystemAiStatusResponse = pb.SystemAiStatusResponse;
|
||||
typedef AskAiResponse = pb.AskAiResponse;
|
||||
typedef ModuleInfoResponse = pb.ModuleInfoResponse;
|
||||
typedef FlowSummary = pb.FlowSummary;
|
||||
typedef StoreEntry = pb.StoreEntry;
|
||||
|
|
@ -184,6 +186,19 @@ class HubClient {
|
|||
return _admin.channelStatus(Empty());
|
||||
}
|
||||
|
||||
/// Read-only system-AI status. `enabled=false` lets Studio
|
||||
/// render "configure in Settings" without making a request.
|
||||
Future<SystemAiStatusResponse> systemAiStatus() {
|
||||
return _admin.systemAiStatus(Empty());
|
||||
}
|
||||
|
||||
/// One-shot prompt to the configured System AI. Errors come
|
||||
/// back inside [AskAiResponse.errorKind] (not as exceptions)
|
||||
/// so Studio can map each category to its inline-fix copy.
|
||||
Future<AskAiResponse> askAi(String prompt) {
|
||||
return _admin.askAi(pb.AskAiRequest(prompt: prompt));
|
||||
}
|
||||
|
||||
/// Search the hub's bundled store index. All filters are
|
||||
/// optional; an empty query returns the first [limit] entries
|
||||
/// the index ships with.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue