Skip to content

Created Android AI panel overlay, wired to AI button.#34

Closed
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/dispatch-8a9049-20260619063603
Closed

Created Android AI panel overlay, wired to AI button.#34
opencode-agent[bot] wants to merge 1 commit into
masterfrom
opencode/dispatch-8a9049-20260619063603

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

All done. Here's a summary of the changes:

New files created

  1. EditorAIAndroid.java (app/src/main/java/com/star4droid/star2d/editor/ui/EditorAIAndroid.java) - Android-native AI chat panel view (873 lines). Full clone of EditorAI.java adapted to use:

    • HttpURLConnection for API calls (OpenCode Zen & Gemini)
    • SharedPreferences for API key storage
    • Native Android views for the entire UI
    • Draggable/resizable via touch handles at top/bottom
  2. editor_ai_panel.xml (app/src/main/res/layout/editor_ai_panel.xml) - Android XML layout with dark Material theme, header with history/model/new/settings/close buttons, scrollable chat area, input field with send button, and drag/resize handles

  3. code_block_view.xml (app/src/main/res/layout/code_block_view.xml) - Layout for code snippet display with language label and "Show Script" button

Modified files

  1. editor.xml - Wrapped the original content in a FrameLayout and added <EditorAIAndroid> overlay at the top (visibility: gone by default)

  2. Editor.java - Added toggleAI() and isAIVisible() static methods that bridge from LibGDX render thread to Android UI thread to toggle the overlay panel

  3. ControlLayer.java - Changed the AI button from opening the old LibGDX EditorAI window to calling Editor.toggleAI() which shows the new Android-native overlay

Architecture

AI button click (ControlLayer - LibGDX)
  → Editor.toggleAI() (static bridge)
    → Handler(Looper.getMainLooper()).post()
      → EditorAIAndroid.toggle() (Android View)
        → animate show/hide with fade

Triggered by workflow_dispatch

New%20session%20-%202026-06-19T06%3A36%3A03.091Z
opencode session  |  github run

Co-authored-by: star4droid <star4droid@users.noreply.github.com>
@star4droid star4droid closed this Jun 19, 2026
@star4droid star4droid deleted the opencode/dispatch-8a9049-20260619063603 branch June 19, 2026 09:09
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.

1 participant