[WIP] feat: Add embed widget support to Ozwell AI Assistant - #81
Open
aditya-damerla128 wants to merge 61 commits into
Open
[WIP] feat: Add embed widget support to Ozwell AI Assistant#81aditya-damerla128 wants to merge 61 commits into
aditya-damerla128 wants to merge 61 commits into
Conversation
Introduces OzwellButton and OzwellModal components for AI-powered writing assistance, with context-aware autofill in ticket creation and other inputs. Adds settings page for Ozwell configuration, server methods for session and prompt management, and updates layout and tickets page to support Ozwell features.
Introduces a new 'Paste and Save' button in the Ozwell modal footer when a session URL is present. This feature allows users to copy AI-generated content from the chat, paste it from the clipboard, and save it, with validation to prevent saving console logs or irrelevant content. Includes user instructions and fallback for restricted clipboard access.
Improves the Ozwell modal by providing time tracking-specific prompts, richer context data for AI interactions, and enhanced content monitoring for autofill. TicketsPage now supplies detailed project statistics and activity summaries to support more informative AI-generated content.
Trying to get message content extraction working from Ozwell. Changed content capture from iframe and postMessage events. Added a catch-all extraction method, more comprehensive DOM selectors, and prioritize captured content for autofill. Refactored closeOzwell logic to use new extraction strategies and fallback messaging.
Merged the copy and save instructions into a single step and removed the Auto Save button from the modal. Updated the save logic to use a direct clipboard check when saving, streamlining the user experience and code.
Replaces iframe-based Ozwell assistant with direct calls to a reference server API for chat and autofill functionality. Updates modal UI, conversation flow, and settings page to support custom server URL and model selection. Adds new server method for reference assistant and improves prompt/context handling throughout.
Rewrote the toggle between modal and side panel layouts for the Ozwell AI Assistant. Adds support for extracting and displaying multiple suggestions from assistant responses, allowing users to select and insert a preferred suggestion. Improves prompt button styling and accessibility, and refactors event handling for layout switching and suggestion selection.
Improves OzwellButton to collect related form field values and passes them to the modal for richer context. Refactors OzwellModal to display and toggle context summary, improves suggestion extraction logic, and updates UI for better usability. Minor layout adjustments in TicketsPage and code cleanup in main.js.
Cleared out the gradient style for one that matches the existing app design scheme
Introduces recent conversation listing and resuming in the modal. Currently restricted to history on a per input box basis. Updates client logic to load, display, and resume previous conversations, and server methods to support saving, listing, and fetching conversation metadata. Enhances user experience by allowing users to continue previous chats and manage conversation context.
Enhances the logic for setting the conversation label by combining the prompt title and a preview of the user's message, with truncation for length. Also fixes indentation and error handling in the content generation function.
Modified the formatConversationTimestamp helper to accept an optional label and updated the template to use it. The tooltip now displays both the formatted timestamp and the conversation label if available.
Updated the create ticket form to use flexbox for input and button alignment, replacing absolute positioning with flex containers for better layout consistency and maintainability.
Introduces a toggle in the Ozwell modal to switch between the native chat interface and a new MCP frame loaded via an iframe. Implements message passing between the modal and the MCP frame for prompt handling, and adds the standalone MCP frame prototype at /ozwell-frame.html.
Introduces a new MCP smoke test script for manual testing of the Ozwell modal frame. Recent chats functionality in OzwellModal is now gated behind a feature flag (ENABLE_RECENT_CHATS), disabling related UI and logic unless enabled. Also updates iframe src to use /ozwell-frame.html.
Added explanatory comments to OzwellModal.js and ozwell-frame.html to clarify that the current MCP bridge implementation is a stub and does not follow the real MCP wire protocol. These notes provide guidance for future integration with the official MCP transport.
Added the 'ozwellai' package (v1.0.0) to dependencies in package.json and package-lock.json to enable new functionality or integration.
- add a tickets page container for the embed iframe - load the reference server script in dev and mount/configure the widget - point the iframe at localhost:3000 so it renders the standalone chat client
Replaces the MCP iframe in OzwellModal with a new embedded chat widget, updating related setup and teardown logic. Removes the Ozwell widget from TicketsPage and its initialization code. This change streamlines chat integration and centralizes widget management in OzwellModal.
…dling Switched Ozwell embed script, endpoint, and widget URLs to use the production reference server. Enhanced logging for embed script loading, error handling, and chat mounting. Improved iframe management to ensure fresh mounts with updated configuration.
Introduces a new 'mcp-server' directory with environment example, documentation, and a Node.js MCP server implementation. The server exposes tools for interacting with TimeHarbor via the MCP protocol, including project listing, ticket creation, and time tracking status, and connects to the Meteor backend using HTTP API calls. Includes setup and testing guides for integration with Claude Desktop.
Introduces a new '/settings' route with authentication check and updates navigation logic to handle settings. Also refines email input pattern handling and fixes missing newlines at end of files.
Provides detailed steps for configuring the optional Ozwell AI writing assistant, including obtaining API credentials, starting the MCP reference server, and enabling Ozwell in the app settings. This helps users set up AI-assisted features if desired.
Deleted the mcp-server directory, including its code, environment example, documentation, and testing guide. Updated README.md to remove references to the MCP server and clarify Ozwell assistant setup instructions.
…d state management
…s, clean up server methods, and update TicketsPage to remove OzwellButton, switching everything to the chatbot
…d smoke test; clean up server methods
…ove iframe-sync integration
…real-time form sync feature in ozwell-mcp-tools.js
…y into chat-wrapper.js
…_ticket_time function
…Ozwell chat configuration
…ndlers from MCP tools
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 production embed widget support to the Ozwell AI Assistant, building on PR #63. Users can now toggle between the native chat interface and an embedded widget loaded from the production server.
What's New (on top of PR #63)
Embed Widget Integration
https://ozwellai-reference-server.opensource.mieweb.org/embed/*Production URLs
EMBED_SCRIPT_URL: Production embed.jsEMBED_ENDPOINT: Production chat endpointEMBED_WIDGET_SRC: Production widget.htmlConfiguration Fixes
src→widgetUrl(matches embed script API)Changes Since
llama-reference-serverBranchModified Files:
client/components/ozwell/OzwellModal.html- Added embed container and toggle UIclient/components/ozwell/OzwellModal.js- Embed script loading, iframe management, production URLsREADME.md- Updated setup instructionsTesting
Notes
Additional changes in this branch are from resolving merge conflicts with upstream
mainand creating a new embed client in ozwellai-api.