Repository navigation
Conversation
Two lines of HTML next to a form now give the user the whole panel: a text box, an optional microphone, a fill button, live status, a summary of what was filled and what is still missing, undo, and an optional review step. Plain DOM in a shadow root, no dependencies, no CSS injected into the page. - lib/ui: the element, its stylesheet and the ai-form-fill/ui entry - lib/browser.ts plus vite.browser.config.js: one minified IIFE that registers the element and exposes the API on the AIFormFill global - package.json: the ./ui export plus the unpkg and jsdelivr fields Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Reviewer's GuideThis PR adds a shadow-DOM Sequence diagram for AI form fill and review flowsequenceDiagram
actor User
participant Element as AIFormFillElement
participant Controller as FormFillController
participant Provider as AIProvider
participant Form as HTMLFormElement
User->>Element: Enter text and activate submit
Element->>Controller: extract(text)
Controller->>Provider: chat(extraction request)
Provider-->>Controller: Structured field data
alt review attribute present
Controller-->>Element: ExtractResult
Element-->>User: Show review rows and checkboxes
User->>Element: Activate Apply
Element->>Controller: applyExtracted(data, fields)
else direct fill
Element->>Controller: fill(text)
end
Controller->>Form: apply field values
Form-->>Element: aff:field-filled events
Element-->>User: Show status and summary
User->>Element: Activate Undo
Element->>Controller: undo()
Controller->>Form: Restore previous values
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Two lines of HTML next to a form now give the user the whole panel: a text box, an optional microphone, a fill button, live status, a summary of what was filled and what is still missing, undo, and an optional review step. Plain DOM in a shadow root, no dependencies, no CSS injected into the page.
lib/ui/:AIFormFillElement,DEFAULT_STRINGS,defineFormFillElement, the shadow stylesheet, and the newai-form-fill/uientry (dist/ui.js,.cjs,.d.ts).lib/browser.tsplusvite.browser.config.js:dist/ai-form-fill.browser.js, one minified IIFE with core, voice and ui that registers the element on load and exposes the API on theAIFormFillglobal.pnpm buildruns both configs.package.json: the./uiexport plusunpkgandjsdelivr.tests/ui/element.test.tsand four more build-entry checks. Full suite: 203 passing.Everything is styled through
::partnames and--aff-*variables; filled fields carrydata-aff-filledfor 1.5 seconds so the page can highlight them.Base is
voice/dictation-build(#4), so review that one first.🤖 Generated with Claude Code
Summary by Sourcery
Introduce a ready-to-use AI form-filling custom element and browser distribution while preserving modular core, voice, and UI entry points.
New Features:
<ai-form-fill>custom element with form targeting, AI filling, voice dictation, review/apply, undo, status reporting, localization, and styling hooks.ai-form-fill/uientry point and provide a bundled browser global for script-tag usage.Enhancements:
data-aff-filled.Build:
Deployment:
Documentation:
Tests: