Add appkit-genie-advanced template#205
Draft
KabeerThockchom wants to merge 1 commit intodatabricks:mainfrom
Draft
Add appkit-genie-advanced template#205KabeerThockchom wants to merge 1 commit intodatabricks:mainfrom
KabeerThockchom wants to merge 1 commit intodatabricks:mainfrom
Conversation
Extends appkit-genie with a richer UX layer that surfaces more of the Genie Conversation API. Sits alongside the minimal template (matching the existing agent-openai/-advanced and agent-langgraph/-advanced naming convention) so the bare <GenieChat alias="default" /> example stays as-is. What it adds beyond appkit-genie: - Multi-space picker driven by a custom AppKit plugin that calls WorkspaceClient.genie.getSpace() per configured alias. - Conversation history sidebar (genie.listConversations); clicking a row routes to ?conversationId=X and triggers AppKit's existing SSE replay endpoint. - Live progress checklist (SUBMITTED -> ASKING_AI -> EXECUTING_QUERY -> COMPLETED) rendered from message.status. Past steps strike through and blur with a checkmark; current step animates a spinner; future steps render dimmed dots. - Per-message thumbs feedback wired to genie.sendMessageFeedback. - Client-side CSV export from GenieStatementResponse. - Markdown rendering for Genie space description (marked) so bold, inline code, and bullet points format properly in the sidebar. - Plug-and-play config: customer sets DATABRICKS_GENIE_SPACE_ID for one space, or GENIE_SPACES=alias=id,alias=id for several. Architecture: a small custom AppKit plugin (server/plugins/genie-advanced.ts) exposes four endpoints under /api/genieAdvanced/* (listSpaces, listConversations, attachment query result, feedback). All run via asUser(req) so end users only see spaces they have permission for. The chat itself still uses AppKit's bundled genie() plugin SSE. Co-authored-by: Isaac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
appkit-genie-advanced/— a sibling template toappkit-genie/that surfaces more of the Genie Conversation API. Sits next to the minimal template (matching the existingagent-openai/agent-openai-advancedandagent-langgraph/agent-langgraph-advancedconvention), so the bare<GenieChat alias="default" />example stays as-is for users who want it.The motivation:
appkit-genieis intentionally tiny (createApp({ plugins: [genie(), server()] })plus a 10-line page), which is great as a "look how easy AppKit is" example, but it shows a thin slice of what the Genie API can do. The advanced template is for customers who want to ship a richer surface — multi-space, conversation history, feedback, exports — without rewriting it from scratch.What's new
WorkspaceClient.genie.getSpace()per configured alias and exposes the list atGET /api/genieAdvanced/spaces. Users see only spaces they have permission for (asUser(req)per request).genie.listConversations. Clicking a row updates?conversationId=X; AppKit's existing SSE replay endpoint takes over from there.SUBMITTED → ASKING_AI → EXECUTING_QUERY → COMPLETED. Past steps strike through and blur with a checkmark; current step shows a spinner; future steps render dimmed dots. Driven entirely by the per-message status events AppKit's SSE plugin already emits.genie.sendMessageFeedback. Stays inline with the assistant message.GenieStatementResponse. No extra backend call.marked(already a transitive dep via AppKit-UI; promoted to a direct dep here). Bold, inline code, bullets, headings all render in the sidebar.Plug-and-play config
Customer points at any space they have access to:
Then
npm install && npm run dev.Architecture
Custom plugin under
server/plugins/genie-advanced.tsadds:/api/genieAdvanced/spacesgetSpace()per alias/api/genieAdvanced/spaces/:alias/conversationslistConversations/api/genieAdvanced/spaces/:alias/conversations/:cid/messages/:mid/attachments/:aid/resultgetMessageAttachmentQueryResult/api/genieAdvanced/spaces/:alias/conversations/:cid/messages/:mid/feedbacksendMessageFeedbackThe chat itself still uses AppKit's bundled
genie()plugin SSE — this template only adds endpoints that aren't currently exposed. No fork of the existing plugin.Screenshots
Initial state (
/genie-advanced) — space picker populated, conversation history loaded, empty chat ready02-initial.pngMarkdown space description, expanded —
markedrendering bold + inline code + bullets04-about-expanded-markdown.pngHistory replay — clicking a past conversation, AppKit's SSE replays the full thread
03-history-replay.pngLive progress checklist mid-stream — past steps blurred + struck through with checkmark, current step bold + spinning
07-progress-checklist-mid.pngCompleted message — assistant text, SQL Query expandable, data table,
<GenieQueryVisualization>chart, thumbs + CSV actions08-completed-with-chart.pngThumbs feedback — POST to
genie.sendMessageFeedback, button reflects the active rating09-thumbs-up-clicked.pngTest plan
npm run typecheck— cleannpm run lint— cleannpm run build— clean (server.js + client/dist/)This pull request and its description were written by Isaac.