Skip to content

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

Duck.ai Playwright UI

A minimal Node app with AI provider and language selectors. The server launches Chromium for each request, asks the selected provider for code in the chosen language, and copies the detected code block into the output field.

Setup

npm install
npx playwright install chromium
npm start

For debugging the live Duck.ai page:

KEEP_BROWSER_OPEN_AFTER_RESPONSE=true npm start

Open http://localhost:3000.

Configuration

  • PORT — HTTP port, default 3000.
  • AI_PROVIDER — default provider (duck, lumo, or mistral), default duck.
  • MISTRAL_AI_URL — Mistral Le Chat URL, default https://chat.mistral.ai/chat.
  • DUCK_AI_URL — Duck.ai URL, default https://duck.ai/.
  • LUMO_AI_URL — Proton Lumo URL, default https://lumo.proton.me/guest.
  • PROMPT_TIMEOUT_MS — navigation/response timeout, default 60000.
  • HEADED_BROWSER=false — run Chromium headless. By default the browser is headed so it is visible during local debugging.
  • KEEP_BROWSER_OPEN=true — legacy behavior that keeps the API request pending; avoid this during normal UI use.
  • KEEP_BROWSER_OPEN_AFTER_RESPONSE=true — keep the browser open after the server has returned the response; useful for debugging without blocking the UI.

Supported languages are C++, Go, Java, Python, Rust, Swift, and Typescript.

Duck.ai’s DOM can change over time. The server first prefers accessible prompt and submit controls, then falls back to common textarea/form selectors. If the site changes substantially, update findPromptInput, submitPrompt, or readAssistantResponse in server.js.

Notes

This app is intended for local use. Add authentication, rate limiting, and request queuing before exposing it publicly. Duck.ai availability and any usage restrictions are outside this app’s control.

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages