Skip to content

feat: add ElevenLabsWidget with a runnable DemoApp - #224

Merged
renal128 merged 2 commits into
nextfrom
elevenlabs-widget
Aug 8, 2026
Merged

feat: add ElevenLabsWidget with a runnable DemoApp#224
renal128 merged 2 commits into
nextfrom
elevenlabs-widget

Conversation

@renal128

@renal128 renal128 commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

First slice of the widget port. Adds ElevenLabsWidget as a second product in the package and an Examples/DemoApp that uses it, so everything after this is reviewable against something you can actually run.

  • Widget: floating launcher, drawer, transcript, composer, mic mute, a static placeholder orb.
  • ChatWidgetController: the host's handle on the widget — mirrors state (state, isOpen, isMicMuted, conversationId, messageCount) and forwards commands (open, close, startConversation, sendMessage, setMicMuted, ...).
  • ChatWidgetConfig / ChatWidgetStrings / ChatWidgetTheme for behavior, copy, and colors.
  • Examples/DemoApp: a real-estate search form driven by an update_real_estate_search client tool, plus buttons that drive the widget through the controller.

Everything is #if canImport(UIKit) and @available(iOS 16, ...), so the SDK keeps its iOS 13 floor and swift build on macOS compiles the widget to an empty module.

Not in this PR

The real orb (next), conversation modes, drawer polish, markdown transcript, error banner, attachments, feedback, terms, and MCP approval all land as their own slices on top.

Test plan

  • swift build, swift test, swiftformat . --strict
  • xcodebuild of Examples/DemoApp for the iOS simulator
  • Manual: launcher opens the drawer, text conversation round-trips, client tool fills the form

Note that repo CI only builds PRs targeting main, so this stack gets SwiftFormat but no build job.

Comment thread Sources/ElevenLabsWidget/Views/ChatOrbView.swift
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 69c2305 to c5ab2e8 Compare July 26, 2026 14:10
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from c5ab2e8 to 74fa1ed Compare July 26, 2026 14:33
Comment thread Sources/ElevenLabsWidget/ChatWidgetController.swift
Comment thread Sources/ElevenLabsWidget/ChatWidgetController.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 74fa1ed to a56d7f6 Compare July 26, 2026 15:02
Comment thread Sources/ElevenLabsWidget/Views/ChatTranscriptView.swift
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from a56d7f6 to a8802b0 Compare July 26, 2026 16:30
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from a8802b0 to 47ba3ab Compare July 26, 2026 16:54
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch 2 times, most recently from 437c6f4 to c6af73b Compare July 26, 2026 17:09
@renal128
renal128 force-pushed the elevenlabs-widget branch from c6af73b to 8f6aced Compare July 26, 2026 22:37
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 8f6aced to 4b63731 Compare July 26, 2026 22:43
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 4b63731 to c8a929d Compare July 26, 2026 23:10
Comment thread Sources/ElevenLabsWidget/ChatWidgetController.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from c8a929d to 00d64fe Compare July 27, 2026 09:22
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift Outdated
Comment thread Sources/ElevenLabsWidget/Views/ChatPopupView.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 00d64fe to 96a5fdc Compare July 27, 2026 09:33
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 96a5fdc to 08f36b3 Compare July 27, 2026 09:41
Comment thread Sources/ElevenLabsWidget/Views/ChatInputBar.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 08f36b3 to 2368fd3 Compare July 27, 2026 09:54
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
Comment thread Sources/ElevenLabsWidget/ViewModels/ChatWidgetViewModel.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from 2368fd3 to 484eee0 Compare July 27, 2026 10:07
Comment thread Examples/DemoApp/DemoApp/ContentView.swift Outdated
@renal128
renal128 force-pushed the elevenlabs-widget branch from 484eee0 to d8749e3 Compare July 27, 2026 10:13
Comment thread Sources/ElevenLabsWidget/Views/ChatWidget.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch from d8749e3 to 1ec10cc Compare July 27, 2026 10:27
Comment thread Sources/ElevenLabs/Internal/Conversation/Conversation.swift
@renal128
renal128 force-pushed the elevenlabs-widget branch 2 times, most recently from 8e6a505 to 2e21ae8 Compare August 4, 2026 16:16

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2e21ae8. Configure here.

@renal128
renal128 force-pushed the elevenlabs-widget branch from 2e21ae8 to a6a1582 Compare August 4, 2026 16:38
@renal128
renal128 force-pushed the elevenlabs-widget branch 2 times, most recently from d1daed8 to d144cd6 Compare August 4, 2026 19:23
@renal128
renal128 force-pushed the elevenlabs-widget branch from d144cd6 to 6c5116b Compare August 4, 2026 19:31
@renal128
renal128 force-pushed the elevenlabs-widget branch from 6c5116b to 4501f9e Compare August 4, 2026 19:34
Base automatically changed from refine-public-layout to next August 4, 2026 19:39
renal128 and others added 2 commits August 4, 2026 20:39
ChatWidget renders a floating launcher and a drawer with transcript, composer,
mic toggle and a placeholder orb, driven by a trimmed ChatWidgetViewModel over
ConversationClient. ChatWidgetController is the host control surface from the
start. Examples/DemoApp exercises it end to end with a client tool.

WidgetConversationMode says how the user can reach the agent — text only, voice
only, voice with a composer, or either — and carries the credentials each kind
of session needs, so a widget can't be configured for a session it has no way
to authenticate. Credentials are minted per start.

The drawer is a bottom sheet with a compact and an expanded detent: drag or tap
the grabber to move between them, fling down to dismiss, and the compact height
adapts to landscape. Voice drawers open as a peek and grow once there is a
transcript to read.

Failures land in a banner across the top of the drawer — start and send errors
auto-dismiss, while denied microphone access stays until it is acted on and
offers Settings, since the SDK connects muted rather than failing there.

Co-authored-by: Cursor <cursoragent@cursor.com>
Keep widget config/mode live, cancel credential mint before bind, and avoid
stale connected/tool work so end/disappear can tear down a session safely.

Co-authored-by: Cursor <cursoragent@cursor.com>
@renal128
renal128 force-pushed the elevenlabs-widget branch from 4501f9e to ef1d129 Compare August 4, 2026 19:39
@renal128
renal128 merged commit dffa52c into next Aug 8, 2026
2 checks passed
@renal128
renal128 deleted the elevenlabs-widget branch August 8, 2026 21:14
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