Skip to content

feat: Add WebEdit Agent for web page browsing and DOM selection #511

@phodal

Description

@phodal

Summary

Add a new WebEdit agent type that allows users to:

  • Browse web pages in an embedded WebView
  • Enter selection mode to select DOM elements
  • View the DOM tree structure in a sidebar
  • Ask questions about the page content or selected elements

Features

Core Components

  • WebEditBridge: Abstraction layer for bidirectional WebView-Kotlin communication
  • DOMElement model: Data classes representing DOM structure with bounding boxes
  • WebEditBridgeScript: JavaScript injection for DOM selection functionality

UI Components

  • WebEditPage: Main page with URL bar, WebView area, DOM sidebar, and chat input
  • WebEditToolbar: Navigation controls and mode toggles
  • DOMTreeSidebar: Interactive DOM tree view
  • WebEditChatInput: Q&A input for LLM integration

Platform Support

  • JVM and WASM implementations of WebEditBridge
  • Uses expect/actual pattern for platform-specific code

Related

This feature adds the WEB_EDIT agent type to the existing agent framework.

TODOs

  • Create platform-specific WebView implementation for JVM
  • Integrate JavaScript bridge script injection on page load
  • Connect LLM service for page/element Q&A functionality
  • Add element extraction and code generation features

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions