Skip to content

Ask inklet: a conversation with the knowledge base - #4

Merged
CLCK0622 merged 1 commit into
mainfrom
feat/ask
Sep 24, 2026
Merged

CLCK0622 merged 1 commit into
mainfrom
feat/ask

Conversation

@CLCK0622

Copy link
Copy Markdown
Member

macOS half of CONVERSATION_CONTRACT.md (inklet-sdk). Needs inklethq/backend#50 deployed (and inklethq/worker#21) before the page answers; until then sending is refused with the backend's error, shown in an alert.

What it adds

  • Ask in the sidebar, and "Ask inklet…" (⌘⇧A) in the app menu and the menu bar item. Conversations on the left (new / delete from the context menu), the thread on the right, a composer at the bottom (Return or ⌘Return sends).
  • Every message starts one round. The reply is drawn as it is written from the round's Analysis event stream (assistant.delta, polled like the composer's runs), with the agent's current step under it (agent.activity), then the settled message — text, the notes it drew on, what the agent did — is read back from the conversation. A round still running when the page opens is picked up where it is.
  • InkletPresentationKit: the conversation DTOs; AnalysisEventDTO.displayText knows the chat kernel's activity kinds.
  • InkletAPI: conversations, createConversation, conversation(id:), conversationMessages, deleteConversation, sendMessage (Idempotency-Key; reply_in_progress / plan_upgrade_required keep their codes).
  • AskModel is owned by AppModel and cleared on sign-out with everything else.

Tests

DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer xcrun swift test: 75 tests pass, including ConversationModelsTests (message decoding, open/closed states, the send result's reply handle, activity status lines).

A new Ask page in the sidebar (⌘⇧A from the app menu and the menu bar item)
for CONVERSATION_CONTRACT: conversations on the left, the thread on the
right, a composer at the bottom. Every message starts one round; the reply is
drawn as it is written from the round's Analysis event stream
(assistant.delta), with the agent's current step under it, then the settled
message — text, the notes it drew on, what the agent did — is read back from
the conversation. A round still running when the page opens is picked up
where it is. The backend refuses sending without the Pro `ai_chat`
capability; the refusal is shown as is.

- InkletPresentationKit: Conversation, ConversationMessage, citation, action,
  detail, page and send-result DTOs; status lines for the chat kernel's
  activity kinds (searching_notes with stats.matches, reading_note,
  creating_card, switching_display).
- InkletAPI: conversations list / create / read / messages / delete, and
  sendMessage with an Idempotency-Key that keeps the backend's error code.
- AskModel (owned by AppModel, cleared on sign-out) and AskView.
Copilot AI lite review requested due to automatic review settings September 24, 2026 08:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@CLCK0622
CLCK0622 merged commit 23e696b into main Sep 24, 2026
1 check passed
@CLCK0622
CLCK0622 deleted the feat/ask branch September 24, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants