(function () { const translations = { meta: { htmlLang: 'en', pageTitle: 'Universal Web-to-API Guide' }, ui: { navTitle: 'πŸ“‘ Navigation', pageHeaderTitle: 'Universal Web-to-API Guide (v2.8.9)', projectLinkLabel: 'Project Link', projectLinkDescription: 'Need the source code, release notes, or the issue tracker? Start here.', projectLinkButton: 'Open Repository', languageLabel: 'Language', themeLight: 'Light Mode', themeDark: 'Dark Mode', hamburgerOpenLabel: 'Open navigation menu', hamburgerCloseLabel: 'Close navigation menu', siteCardHint: 'Click to copy the URL, then open it in the controlled browser', siteCardCopied: 'URL copied. Paste it into the controlled browser', siteCardCopyFailed: 'Copy failed. Please copy it manually and open it in the controlled browser', siteCardEmpty: 'No site list was loaded. Use the current dashboard config as the source of truth.' }, nav: { 'quick-start': 'πŸš€ Quick Start', 'dashboard-tour': 'πŸ–₯️ Dashboard Tour', 'add-site-guide': 'πŸ†• Adding a Site', 'connect-api': 'πŸ”Œ Connect API', 'function-calling': '🧰 Function Calling', 'tab-pool': 'πŸ—‚οΈ Tab Pool', 'presets': 'πŸŽ›οΈ Presets', 'selectors': 'πŸ” Selectors', 'extractors': '🧩 Extractors', 'image-extraction': '🎞️ Multimodal Extraction', 'response-detection': '🌊 Response Detection', 'workflow': '🎬 Workflow', 'file-paste': 'πŸ“„ File Attach', 'stealth-mode': 'πŸ›‘οΈ Low-Interference Mode', 'commands': '⚑ Automation Commands', 'ai-recognition': '🎯 AI Recognition', 'env-config': 'βš™οΈ Environment Settings', 'browser-config': '🌐 Browser Constants', 'config-manage': 'πŸ’Ύ Config Management', 'faq': '❓ FAQ', 'author-note': '⚠️ Notes From the Author' }, sections: {} }; translations.sections['quick-start'] = `

πŸš€ Quick Start

Welcome to Web-to-API. This project connects browser-based AI chat sites to a local OpenAI-compatible interface for personal testing, workflow integration, and client-side orchestration.

Recommended reading order: read the main workflow of this page first, then come back to the author note at the end. That section explains the maintenance scope, support expectations, and the most effective feedback channels.

πŸ“Œ Core reminder: after startup the script opens a controlled browser window automatically. Keep that browser window open, because it is the foundation of the service. The tutorial can stay open in your normal browser; when the script is about to run, the controlled browser should contain nothing except the target site.

1️⃣ Recommended first-time flow

  1. After you run start.bat, first tell the two browser windows apart: the controlled browser used by the script, and the regular browser that shows this tutorial or that you use every day.
  2. By default the controlled browser uses the project's chrome_profile/. On a first launch it is usually a blank, signed-out browser profile. If you did not already have a browser open, the script may also open a separate browser window for this tutorial, so it can look like two browsers appeared at once.
  3. The window you should actually operate next is the controlled browser. Open the site you want to use there. For Gemini, a good starting URL is https://gemini.google.com/. Before the script starts handling requests, make sure that controlled browser contains only the target site, not search pages, tutorial pages, mail, or any unrelated tabs.
  4. Sign in on that site normally inside the controlled browser, and make sure you have reached the chat page.
  5. For Gemini, make sure the left sidebar is expanded instead of collapsed. That makes it easier to match the later site configuration and API connection steps.
  6. Once the site is open and signed in, come back to this tutorial and continue with the Connect API section below. Fill your client using the Base URL, API Key, and model examples there.

πŸ’‘ Want to reuse an existing login state? Treat that as an advanced option. For normal use, it is safer to keep using the project's own chrome_profile/ directory and keep your session isolated there.

⚠️ Only do profile-copy reuse if you understand browser user-data structure and session-data risk. If you really need it, only copy your own local browser profile into a separate directory. Do not share, publish, or mix someone else's login-state data. The detailed steps stay in the Browser Configuration section later in this page.

Dashboard entry:

Open Dashboard

Dashboard URL: http://127.0.0.1:8199/. You can edit configs and inspect logs there.

βœ… Supported sites

The following sites already have built-in adaptation and can usually be used directly:

Tip: the site cards below now copy the URL to your clipboard instead of opening in the current tutorial browser. Paste the copied URL into the controlled browser.

Sites highlighted in the current docs: ChatGPT, DeepSeek, Gemini, Claude, Kimi, Qwen, Grok, Doubao, AI Studio, and Arena AI.

The site cards below refresh from the current runtime config after the page loads. If you changed a domain or startup URL locally, trust the cards and the dashboard over any older screenshots.

⚠️ About arena.ai: this site is highly sensitive to IP quality. A good IP can keep chatting for a long time, while a poor IP may get blocked immediately. The most important factors are not just IP purity, but also traffic history and sharing level. If your IP quality is weak, Cloudflare challenges can still appear even with network interception disabled. That behavior comes from the site itself, not from this project.

πŸ†• For unsupported sites

If your target site is not listed above, the system can analyze the page automatically with a helper AI. See the AI Recognition section below.

`; translations.sections['dashboard-tour'] = `

πŸ–₯️ Dashboard Tour

The dashboard is not just a settings page. It is the visual control center of the whole project.

πŸ“š Sidebar

🧭 Site Configuration

πŸ—‚οΈ Tabs, Logs, Settings, and Extractor Troubleshooting

Suggested reading order: for first-time use, start with the site config page and the tab pool. When debugging failures, go to logs first. When adapting a new site, read Settings β†’ AI Recognition.

πŸ“Έ Dashboard overview: static/tutorial-dashboard-overview.png

This screenshot works well as a visual map of the control panel.

Dashboard overview screenshot
`; translations.sections['add-site-guide'] = `

πŸ†• Adding a Site

There are two main paths: automatic recognition and manual configuration. For a first attempt, automatic recognition is usually the fastest path.

Path A: AI-based automatic recognition

  1. Open the dashboard β†’ Settings β†’ Environment, then fill in HELPER_API_KEY, HELPER_BASE_URL, and HELPER_MODEL.
  2. Open the target site in the controlled browser and stay on the real chat page. Before sending the request, make sure the controlled browser contains nothing except the target site.
  3. Send the first real API request to that site.
  4. If the domain is still missing from config/sites.json, the backend reads the page HTML, asks the helper AI to analyze it, and writes a generated preset into the site config.

Key point: automatic recognition starts on the first real request to an unknown domain. The Add Site button only creates an empty shell.

Path B: manual configuration

  1. Click Add Site.
  2. Enter a domain such as chat.example.com.
  3. Open the main preset and fill in the three core selectors first.
  4. Create the shortest possible workflow and test it step by step.
  5. Save the config and make one real API call.

Minimum working configuration

KeyPurposePriority
input_boxChat input fieldβœ…
send_btnSend buttonβœ…
result_containerContainer that holds the AI replyβœ…
new_chat_btnNew-chat buttonOptional
message_wrapperOuter container for one messageOptional
[
  { "action": "CLICK", "target": "new_chat_btn", "optional": true, "value": null },
  { "action": "WAIT", "target": "", "optional": false, "value": 0.5 },
  { "action": "FILL_INPUT", "target": "input_box", "optional": false, "value": null },
  { "action": "CLICK", "target": "send_btn", "optional": true, "value": null },
  { "action": "KEY_PRESS", "target": "Enter", "optional": true, "value": null },
  { "action": "STREAM_WAIT", "target": "result_container", "optional": false, "value": null }
]

Recommended debug order

  1. Test input_box
  2. Test send_btn
  3. Test result_container
  4. Run the shortest workflow
  5. Only then tune stream thresholds, extractors, multimodal extraction, and file attach
`; translations.sections['connect-api'] = `

πŸ”Œ Connect API

This project exposes an OpenAI-compatible API.

βš™οΈ Common client settings:

βœ… Test flow: once the site is open and logged in, enter the URL and provider settings in your client and you can start testing immediately.

Routing quick reference

NeedRecommended endpointNotes
Let the system choose an idle tab http://127.0.0.1:8199/v1/chat/completions Use this when you do not care which site tab handles the request
Always use Gemini tabs http://127.0.0.1:8199/url/gemini.com/v1/chat/completions Matches one available Gemini-related tab
Always use a specific tab http://127.0.0.1:8199/tab/2/v1/chat/completions Useful when that tab already has a dedicated role or preset
Use one site with a forced preset http://127.0.0.1:8199/url/gemini.com/pro/v1/chat/completions Useful when one site has multiple modes such as chat, pro, music, or video, and also works well as a direct Base URL

Three ways to specify a preset

The chat endpoints now support preset_name directly. This does not change the site's default preset. It only affects the current request.

Option A: put it directly in the path

curl "http://127.0.0.1:8199/url/gemini.com/pro/v1/chat/completions" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}"

Option B: put it in the URL query

curl "http://127.0.0.1:8199/url/gemini.com/v1/chat/completions?preset_name=pro" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}"

Option C: put it in the JSON body

{
  "model": "any",
  "messages": [
    { "role": "user", "content": "Hello" }
  ],
  "stream": false,
  "preset_name": "pro"
}

Priority rule: if all three are provided, the order is path preset > URL query > JSON body.

πŸ’‘ Practical advice: if your client lets you customize the Base URL, the cleanest choice is usually http://127.0.0.1:8199/url/gemini.com/pro/v1. If that is inconvenient, fall back to ?preset_name=pro or a JSON-body field.

HTTP methods and full route syntax

MethodRoutePurpose
GET /v1/models Default model-list endpoint for OpenAI-compatible client checks
POST /v1/chat/completions Default chat endpoint with automatic tab allocation
GET /url/{domain}/v1/models Domain-routed model list, can use selector or tab_index
POST /url/{domain}/v1/chat/completions Domain-routed chat, can use selector, tab_index, and preset_name
GET /url/{domain}/{preset_name}/v1/models Domain + preset model-list route, useful when you want to use it directly as a Base URL
POST /url/{domain}/{preset_name}/v1/chat/completions Domain + preset chat route, where the preset in the path has the highest priority
GET /tab/{index}/v1/models Fixed-tab model-list endpoint
POST /tab/{index}/v1/chat/completions Fixed-tab chat endpoint, can use preset_name

Supported query parameters:

⚠️ Route compatibility note: the server now supports putting the preset directly into the path, such as /url/gemini.com/pro/v1/chat/completions. If your client checks /models first, you can also use /url/gemini.com/pro/v1/models.

Full examples

# 1. Default model list
curl http://127.0.0.1:8199/v1/models

# 2. Default chat endpoint
curl http://127.0.0.1:8199/v1/chat/completions ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}"

# 3. Domain-routed model list
curl "http://127.0.0.1:8199/url/gemini.com/v1/models?selector=round_robin"

# 4. Domain-routed chat
curl "http://127.0.0.1:8199/url/gemini.com/v1/chat/completions?selector=first_idle" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}"

# 5. Domain route + fixed tab
curl "http://127.0.0.1:8199/url/gemini.com/v1/chat/completions?tab_index=2" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Continue the previous turn\"}],\"stream\":false}"

# 6. Domain + preset model list
curl http://127.0.0.1:8199/url/gemini.com/pro/v1/models

# 7. Domain + preset chat
curl http://127.0.0.1:8199/url/gemini.com/pro/v1/chat/completions ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}"

# 8. Fixed-tab model list
curl http://127.0.0.1:8199/tab/2/v1/models

# 9. Fixed-tab chat
curl http://127.0.0.1:8199/tab/2/v1/chat/completions ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Hello\"}],\"stream\":false}"

# 10. Fixed-tab chat with a forced preset
curl "http://127.0.0.1:8199/tab/2/v1/chat/completions?preset_name=pro" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Continue the previous turn\"}],\"stream\":false}"

πŸ’‘ About login state

⚠️ About SillyTavern: the built-in API test can be unreliable. It is better to send a real conversation instead of using the test button.

⚠️ Context-length note: many websites still limit how much text fits in a single input box. For very long input, enable File Attach so the site can process that content through its own attachment flow.

Observed single-send limits

`; translations.sections['function-calling'] = `

🧰 Function Calling (Tool Calling)

The project supports the OpenAI-style tools format and also the older functions / function_call fields, so most clients that already support Tool Calling can connect directly.

On the model-output side, the backend now prefers a project-local XML block format: <adapter_calls> / <call> / <arg>. The older XML tags <tool_calls> / <invoke> / <parameter> are still accepted for compatibility.

Unlike the earliest versions, this no longer has to fail in a single shot. The backend now includes internal repair retries after invalid tool-call output, and you can tune the strategy directly in Dashboard β†’ Settings β†’ Environment Settings β†’ Function Calling.

What this is: a compatibility layer that lets you keep using familiar OpenAI-style tool definitions.

Preferred output shell: <adapter_calls> β†’ <call name="..."> β†’ <arg name="...">.

⚠️ Important boundary: this is not native API tool calling. The backend rewrites your tool definitions into prompt instructions, the website model tries to follow them, and the backend then parses the result back into OpenAI-style tool_calls. Reliability depends heavily on the model's own reasoning and formatting discipline.

What you can tune in the dashboard

SettingWhereWhat it controls
Retry strategySettings β†’ Environment Settings β†’ Function CallingWhether the repair round sends only minimal correction feedback or the original conversation plus feedback.
Prompt padding obfuscationSettings β†’ Environment Settings β†’ Function CallingRandomizes the extra prefill and tail prompt blocks and inserts a few zero-width characters.
Prompt padding switchSettings β†’ Environment Settings β†’ Function CallingTurns those extra prompt blocks on or off. When off, only the retry strategy prompt remains.
Internal repair retriesSettings β†’ Environment Settings β†’ Function CallingHow many repair rounds are allowed after validation fails. Set it to 0 to disable internal repair.
Single Tool Result limitSettings β†’ Environment Settings β†’ Function CallingStops oversized tool output from being pushed back into the website model.

The two retry strategies

StrategyBest forBehavior
Focused repair (default, recommended)Most normal tool-calling flowsSends only the validation errors and a compact repair context. Usually the most stable option.
Full contextCases where the model keeps repairing incorrectly because it lacks broader contextSends the original conversation together with repair feedback. More context, but also more room for the model to drift again.

What affects success rate

FactorHigher successLower success
Model strengthStrong models such as GPT-5 or Claude 4.5Smaller or specialized models
Tool count1-3 tools10+ tools
Parameter shapeFlat and simpleDeep nesting and complex objects
Naming claritysearch_web, get_weatherfunc1, tool_x
Prompt lengthFocused system promptsVery long role or policy setup

Typical failure patterns

Expectation management: if you see wrong function names, missing arguments, plain chat replies instead of tool calls, or backend parse failures, look at the website model first. In many cases it simply did not produce a stable <adapter_calls> block or valid JSON fallback.

Practical advice

  1. Start with only 1 to 3 tools.
  2. Use clear verb-based names such as search, calculate, or get.
  3. Keep schemas flat before introducing deep nesting.
  4. Prefer stronger models whenever possible.
  5. If parsing keeps failing, simplify tools and arguments before adding more rules.
`; translations.sections['tab-pool'] = `

πŸ—‚οΈ Tab Pool

The tab pool is the project's main scheduling mechanism. The script scans supported AI-site tabs in the browser and gives each recognized tab a persistent index.

How it works

  1. You open one or more AI-site tabs in the browser.
  2. The script detects them and assigns indexes such as 1, 2, and 3.
  3. When an API request arrives, the system chooses one idle tab to handle it.
  4. After the request finishes, that tab goes back to the pool.

Routing options

RoutePath formatDescription
Default route /v1/chat/completions Automatically uses one idle tab
Fixed domain route /url/{domain}/v1/chat/completions Matches a tab from the specified domain, such as /url/gemini.com/v1/chat/completions
Fixed tab route /tab/{index}/v1/chat/completions Uses a specific tab index and queues if that tab is busy

πŸ’‘ When to use a fixed tab:

Advanced parameters for domain routes

ParameterExampleEffect
selector ?selector=round_robin Choose how the server picks among multiple matching tabs
tab_index ?tab_index=2 Further pin a domain route to one specific tab
preset_name ?preset_name=pro Temporarily override the preset for only this request

πŸ’‘ Recommended mental model: /url/gemini.com/... decides which site, selector or tab_index decides which tab, and preset_name decides which config for this one request.

Managing tabs in the dashboard

In the Tabs panel you can:

⚠️ Notes:

`; translations.sections['presets'] = `

πŸŽ›οΈ Presets

Presets let you create multiple independent configurations for the same site and assign different presets to different tabs.

Typical use cases

TabPresetDifference
Tab #1 Pro chat Full workflow, longer timeout, deep extractor
Tab #2 Fast vision Simpler workflow, multimodal extraction enabled, shorter timeout
Tab #3 Coding assistant File attach enabled, higher thresholds, network interception mode

How to use presets

1. Create a preset

  1. Select a site in the dashboard.
  2. Use the preset selector at the top of the config panel.
  3. Click + New Preset and enter a name.
  4. The new preset clones the current preset as a starting point.
  5. Edit selectors, workflow, extractors, and other settings independently.
  6. If needed, click the star action to make it the default preset.

2. Assign a preset to a tab

  1. Open the Tabs page.
  2. Find the target tab row.
  3. Choose the preset from the preset dropdown.

3. Call the site by domain or fixed tab

# Assume one Gemini tab already exists and tab #2 uses the "Fast vision" preset

# Use the Gemini domain route
curl http://127.0.0.1:8199/url/gemini.com/v1/chat/completions

# Use the fixed vision tab
curl http://127.0.0.1:8199/tab/2/v1/chat/completions

4. Override the preset for just one request

# Option A: path-based preset (best when used directly as a Base URL)
curl "http://127.0.0.1:8199/url/gemini.com/pro/v1/chat/completions" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Write me a short intro\"}],\"stream\":false}"

# Option B: query parameter
curl "http://127.0.0.1:8199/url/gemini.com/v1/chat/completions?preset_name=pro" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Write me a short intro\"}],\"stream\":false}"

# Option C: JSON body
curl http://127.0.0.1:8199/url/gemini.com/v1/chat/completions ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Write me a short intro\"}],\"stream\":false,\"preset_name\":\"pro\"}"

# Fixed tab + forced preset
curl "http://127.0.0.1:8199/tab/2/v1/chat/completions?preset_name=pro" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"any\",\"messages\":[{\"role\":\"user\",\"content\":\"Continue the previous turn\"}],\"stream\":false}"

Calling rule: if you explicitly pass preset_name, that preset is forced for the current request. If path, query, and body all provide one, the order is path > query > body. If you do not pass it, the old behavior remains: tab-bound preset first, then site default preset.

πŸ’‘ Tip: every preset contains its own selectors, workflow, stream config, multimodal extraction, and file-attach settings. Editing one preset does not affect the others.

Example structure

{
  "gemini.google.com": {
    "default_preset": "Fast vision",
    "presets": {
      "Main": {
        "selectors": { ... },
        "workflow": [ ... ],
        "stream_config": { ... },
        "image_extraction": {
          "enabled": false,
          "modalities": {
            "image": { "enabled": false, "run_policy": "disabled" },
            "audio": { "enabled": false, "run_policy": "disabled" },
            "video": { "enabled": false, "run_policy": "disabled" }
          }
        },
        "file_paste": { "threshold": 50000 }
      },
      "Fast vision": {
        "selectors": { ... },
        "workflow": [ ... ],
        "image_extraction": {
          "enabled": true,
          "modalities": {
            "image": { "enabled": true, "run_policy": "on_signal" },
            "audio": { "enabled": true, "run_policy": "generic_only" },
            "video": { "enabled": true, "run_policy": "generic_only" }
          },
          "audio_capture_enabled": false,
          "mode": "first"
        },
        "file_paste": { "threshold": 10000 }
      }
    }
  }
}

⚠️ Warning: deleting a preset cannot be undone, and at least one preset must remain.

`; translations.sections['selectors'] = `

πŸ” Selector Configuration

Each site and each preset needs a set of CSS selectors so the program knows where to type and where to click.

Start with these three jobs

Learn the three core fields first

For the first pass, focus only on input_box, send_btn, and result_container. Once these three are correct, the page usually becomes testable.

input_box where you type send_btn where the message is submitted result_container where the reply appears

Use the visual workbench first

The local page is no longer just a toy demo. It now acts as a real selector workbench where you can switch target fields, change page state, inspect suggested candidates, and test whether dynamic classes break your selector.

"selectors": {
  "input_box": "textarea[id='prompt']",
  "send_btn": "button.send-btn",
  "result_container": ".markdown-body",
  "new_chat_btn": "button.new-chat",
  "temp_chat_btn": "button.temp-chat"
}

πŸ’‘ How to find more stable selectors:

Suggested fill order

  1. Inspect the input area first and fill input_box.
  2. Find the send button and fill send_btn.
  3. Wait until one AI answer appears, then capture the outer answer wrapper as result_container.
  4. Use the dashboard test button after every field instead of waiting until the end.
  5. After the first three fields are stable, add new_chat_btn, message_wrapper, and upload-related selectors when needed.

How to use the new visual workbench

  1. Select the field you want to practice on the right. The real target will be highlighted on the mock page.
  2. Paste or type your selector and check whether it uniquely hits the correct target, hits too many nodes, or hits the wrong element.
  3. Use the suggested candidates below and prefer selectors that uniquely match the target.
  4. Click β€œrefresh dynamic class” and test again. If the selector breaks immediately, it was depending on unstable classes.
  5. If a selector matches multiple nodes, inspect the matched element details first before trying to patch the selector blindly.

πŸ§ͺ Test selectors: the dashboard test button now opens a richer selector testing workbench. It shows not just hit count, but also matched element details, suggested candidates, and stability warnings, and it can feed a candidate back into the current field.

πŸ’‘ Custom selectors: you can define extra selectors such as a temporary-chat button and then reference them inside the workflow.

`; translations.sections['extractors'] = `

🧩 Extractor Configuration

When an AI reply comes back messy, incomplete, or loses formatting, start with the extractor. If the issue lives in the underlying response body, move on to parsers and network interception.

{
  "extractor_id": "deep_mode_v1",
  ...
}

πŸ’‘ Configuration advice: if the full answer is already visible on the page and only the extracted result looks wrong, stay in the extractor layer. If default mode is not enough, switch to deep_mode. If the real issue is that the answer is not rendered yet, or you want to read the raw JSON / text directly, move on to parsers and network interception.

⚠️ Complex output reminder: even deep_mode can still struggle with some difficult code blocks. If you need more faithful code, formulas, or raw streaming output, continue to the network interception mode below. Just remember that unsupported sites should not enable it casually.

`; translations.sections['image-extraction'] = `

🎞️ Multimodal Extraction

The control panel now calls this feature Multimodal Extraction. It is responsible for extracting images, audio, and video from the page, then returning stable local URLs or Markdown references that downstream clients can use directly.

"image_extraction": {
  "enabled": true,
  "modalities": {
    "image": {
      "enabled": true,
      "run_policy": "on_signal",
      "quick_probe_timeout_seconds": 1.0,
      "late_wait_timeout_seconds": 45
    },
    "audio": {
      "enabled": true,
      "run_policy": "probe_if_trigger_found",
      "quick_probe_timeout_seconds": 1.0,
      "capture_timeout_seconds": 12
    },
    "video": {
      "enabled": true,
      "run_policy": "on_signal",
      "quick_probe_timeout_seconds": 1.0,
      "late_wait_timeout_seconds": 90
    }
  },
  "selector": "img",
  "audio_selector": "audio, audio source",
  "video_selector": "video, video source",
  "container_selector": ".img-grid",
  "audio_capture_enabled": false,
  "download_blobs": true,
  "mode": "all",
  "max_size_mb": 10
}

Compatibility note: the stored config key is still image_extraction. Legacy boolean values such as "image": true are still normalized automatically, but the recommended format is now a per-modality strategy object so "site supports this modality" is separate from "run long waits or audio capture every turn".

Choosing a run policy

PolicyMeaningUse it when
disabledTurns this modality off completely.The site does not need image, audio, or video extraction.
generic_onlyRuns one quick DOM scan only; no long wait, read-aloud click, or recording.A preset may return media, but you do not want each round to pause, such as Gemini direct media extraction.
on_signalScans quickly first; heavier waiting runs only after a clear generation signal.Image/video generation, or sites whose parser reports media generation state.
probe_if_trigger_foundAudio-oriented. Quickly checks for a read-aloud trigger and captures only if one is found.The page has a read-aloud button, but most turns should not pay the capture cost.
always_probeActively probes whenever the modality is enabled.You know every turn produces that media and accept the waiting cost.

What counts as a signal?

A signal means evidence worth waiting for, not merely that the site supports a modality. Common signals include media or placeholder nodes in the current reply DOM, parser-reported media_generation_state.pending, pending-generation words in the reply, image-generation request hints, or a quick audio probe finding a read-aloud trigger.

πŸ’‘ Key change: the pipeline now starts with a quick scan controlled by quick_probe_timeout_seconds. It only enters late_wait_timeout_seconds long waits or capture_timeout_seconds audio recording when the policy and signal allow it. Supporting audio/video no longer means every round waits for audio/video.

How to use it in the UI:

Saved locations:

πŸ’‘ Response shape: images are returned as embedded Markdown images, while audio and video are returned as Markdown links such as [audio_0](/download_images/xxx.mp3) or [video_0](/download_images/xxx.mp4).

πŸ’‘ Practical advice: decide which modality you truly need, then choose the most conservative policy that works. Use generic_only when you only want existing DOM media, on_signal when generated media may need waiting, and audio capture only on sites with a stable read-aloud entry point.

πŸ”Š Page Playback Audio Capture

Besides reading existing audio / video nodes, the system can click a page-level read aloud / listen / TTS button and capture the spoken audio. This path is controlled separately by audio_capture_enabled; enabling the audio modality alone does not force it to run.

"image_extraction": {
  "modalities": {
    "audio": {
      "enabled": true,
      "run_policy": "probe_if_trigger_found",
      "quick_probe_timeout_seconds": 1.0,
      "capture_timeout_seconds": 12
    }
  },
  "audio_capture_enabled": true,
  "audio_trigger_selector": "button[aria-label=\"Read aloud\"]",
  "audio_trigger_labels": ["Read aloud", "Listen", "TTS"],
  "audio_network_capture": {
    "enabled": true,
    "transport": "page_websocket_probe",
    "url_patterns": ["voicegenie"],
    "extractor": "voicegenie_ogg_pages",
    "timeout_seconds": 2.5,
    "settle_seconds": 0.35
  }
}

Order of operations: after the text reply finishes, the system runs the audio trigger probe according to the audio policy. If clicking succeeds, it first tries direct in-page network capture, such as WebSocket TTS frames; only then does it fall back to recording page playback.

Key fields:

Doubao read-aloud preset: the www.doubao.com read-aloud preset already uses this path. Its default strategy is: run only after a trigger is found, prefer network capture, and fall back to page playback recording.

Playback note: if you want to hear the audio from the controlled browser, make sure that controlled Chrome was not started with --mute-audio. Refreshing the page cannot remove process-level mute; restart the controlled Chrome instance on port 9222.

`; translations.sections['response-detection'] = `

🌊 Response Detection

The system needs to know when the AI starts speaking and when it has really finished. There are two modes here: the default DOM mode and the more advanced network interception mode.

When should you look at non-stream monitoring?

Most sites should stay on DOM mode first

If the reply is visible on the page and you can capture it reliably, DOM mode is already good enough. It is also the easiest starting point when you adapt a new site for the first time.

Switch when these problems show up

Move to network interception when code blocks keep breaking, formulas keep losing structure, DOM extraction becomes unreliable, or the site returns one complete JSON / text payload at a time.

listen_pattern request keyword parser response parser
ModeStreamingDescription
DOM mode (recommended default) βœ… Yes Watches page changes like a human eye and works well for most normal chat scenarios
Network interception mode βœ… Yes, site-dependent Intercepts browser requests directly and parses the response body, better for advanced extraction on adapted sites

DOM mode (recommended πŸ‘€)

DOM mode works by β€œwatching the page”: as long as the content is still changing, the system assumes the AI is still typing. It is the best default for plain-text chats, roleplay, and most everyday use cases.

Decision rule

Finished = (stable checks β‰₯ target count) AND (silence duration > silence timeout)

How it works:

  1. The script checks the page at the configured interval.
  2. If the content changes, the system knows the AI is still generating and keeps streaming new content.
  3. If the content stops changing, the stability count goes up and the silence timer keeps accumulating.
  4. Once both thresholds are satisfied, the reply is considered finished.
  5. If nothing appears before the initial wait expires, the request is treated as failed, which often means the selector is wrong or the reply never started.

Tuning suggestions

ScenarioSilence timeoutStable checksInitial wait
Fast models (GPT-4o)3-5 s3-560 s
Slow reasoning (o1 / Claude)10-15 s8-12300 s
Long-form or code generation8-15 s6-10180-300 s

Network interception mode (advanced πŸ“‘)

⚠️ Prerequisite: network interception must be used together with a site parser. Do not enable it casually on unsupported sites, or you may get errors or raise the chance of anti-bot / Cloudflare challenges.

Network interception works like reading the browser's underlying response directly. It intercepts XHR / Fetch traffic, reads the raw JSON or text, and turns it into final output or incremental chunks. On adapted sites, it is often faster, more stable, and better at preserving code blocks and formulas.

πŸ’‘ How to enable it: open the site configuration in the dashboard, go to Streaming Configuration, and switch the mode to Network Interception.

πŸ’‘ Recommended order: lock the request keyword first, choose the parser second, and tune timeouts after that. Many failed attempts happen because the first two fields are still wrong.

Network interception fields

FieldDescriptionExample
URL match pattern Intercept only requests whose URL contains this text; start with the most stable path keyword GenerateContent
Response parser The parser ID used to read the intercepted response body lmarena / custom parser
First response timeout Maximum wait for the first useful network response 300 s
Silence timeout How long to wait after the last new chunk before considering the reply finished 3 s
Polling interval How often the listener checks for new intercepted data 0.5 s

πŸ’‘ Arena parser note: arena.ai already ships with two parsers. lmarena is for direct single-column mode, and lmarena_side_left is for side-by-side mode and reads the left output automatically. In most cases, keep the default mapping.

⚠️ arena.ai: in practice, it is still safer to stay on DOM mode for this site. Extra browser connections from network monitoring can raise the chance of Cloudflare challenges.

Practical guide: ask AI to write a parser for a new site

If the target site returns JSON, SSE, or plain text from the network layer, you usually need a custom parser. The fastest workflow now is: try the built-in debug capture first, and only fall back to the manual console listener when the built-in capture misses the request.

Recommended first choice: turn on the built-in parser debug capture in Dashboard β†’ Settings β†’ Browser Constants. When a network parser is hit, the project can automatically save raw bodies and parser debug data into logs/network_parser_debug/.

⚠️ Important: built-in capture is much simpler, but it is not guaranteed to catch every site or every response shape. Some websites still need manual in-page interception, especially when their traffic is hidden behind unusual wrappers or paths that the normal listener cannot see cleanly.

Preferred workflow: built-in debug capture

  1. Open the target site in the controlled browser and stay on the real chat page.
  2. In Dashboard β†’ Settings β†’ Browser Constants, enable NETWORK_DEBUG_CAPTURE_ENABLED.
  3. Optionally fill NETWORK_DEBUG_CAPTURE_PARSER_FILTER with the parser you are testing, such as deepseek.
  4. Turn on network interception for that site, then send one simple real message and wait until the reply finishes.
  5. Open logs/network_parser_debug/ and collect the generated JSON debug files.
  6. Send those debug files to AI together with app/core/parsers/base.py, app/core/parsers/__init__.py, and one or two similar parser files.
  7. Ask AI to create app/core/parsers/xxx_parser.py and tell you how to register it in __init__.py.
  8. Return to the dashboard, fill in the suggested listen_pattern and parser ID, then test again.
  9. If the result is still wrong, send AI the debug dump, the bad output, and your current parser file for another round.

Fallback workflow: manual console listener

Use this only when the built-in capture did not record the request or did not preserve enough structure.

Manual helper script: the project already includes static/拦ζˆͺθ―·ζ±‚ε‘η”Ÿε™¨.txt. You can copy it from this tutorial section or open the original text file directly.

View the script inside the tutorial
  1. Open the browser developer tools and switch to Console.
  2. Copy the request generator script and run it on the real site page.
  3. Send one simple real message and wait until the reply finishes.
  4. Run exportRequests() in the console. The browser will download a requests JSON export.
  5. Send that JSON to AI together with the same parser base files and reference parsers.
  6. Ask AI to build the parser and tell you what listen_pattern and parser ID to use.

⚠️ Maintainer-only workflow: the exported JSON can contain live session structure, request metadata, prompt fragments, and response content. Skip this unless built-in debug capture was not enough, and only use it on your own local session data.

πŸ’‘ Tell AI these requirements:

You can send AI a prompt like this:

This is a network parser debug sample from a new site. Please refer to the existing parsers in app/core/parsers and help me add a new parser.

Requirements:
1. Create a new parser class in app/core/parsers/xxx_parser.py and inherit from ResponseParser
2. Inspect the raw response carefully and decide whether it is plain JSON, an SSE/event stream, or another text format
3. After the first successful parse, return done=True to avoid duplicate appends
4. If images are included, fill the images field
5. Tell me what code I need to change in app/core/parsers/__init__.py to register it
6. Tell me what listen_pattern and parser I should fill into the site configuration

Attached:
- debug dump files from logs/network_parser_debug (preferred), or exported requests json from the manual listener if built-in capture missed it
- one or two reference parser files
- app/core/parsers/base.py
- app/core/parsers/__init__.py
`; translations.sections['workflow'] = `

🎬 Workflow

The workflow defines a sequence of actions. Each preset can have its own independent workflow.

"workflow": [
  { "action": "CLICK", "target": "new_chat_btn" },
  { "action": "WAIT", "value": 0.5 },
  { "action": "FILL_INPUT", "target": "input_box" },
  { "action": "CLICK", "target": "send_btn" },
  { "action": "STREAM_WAIT" }
]
ActionDescription
CLICKClick an element, where target is a selector key
FILL_INPUTFill the input box with the user prompt
WAITWait for a fixed number of seconds
KEY_PRESSSimulate a key press such as Enter
JS_EXECRun JavaScript inside the current page when simple clicks are not enough
STREAM_WAITWait until the reply is finished

Visual editor update: the workflow visualizer now keeps abstract steps such as WAIT, KEY_PRESS, and JS_EXEC as their own balls instead of silently dropping or merging them. The saved JSON order now matches the visual order much more closely.

πŸ“Έ Workflow visualization: static/workflow-visualization.png

This screenshot shows how the visual workflow mode helps locate page elements and action steps.

Workflow visualization screenshot
`; translations.sections['file-paste'] = `

πŸ“„ File Attach

When your prompt is too long for the site's input box, the system can write it into a temporary .txt file and try to send it through the site's own upload entry instead of forcing all of the text into the input box.

Settings

FieldDefaultDescription
EnabledDepends on site presetWhether file-attach mode is enabled
Threshold50000 charsGlobal default threshold; site presets can override it
Hint textFocus entirely on the file contentExtra instruction appended after the file is attached to remind the model to read the attachment

πŸ’‘ Upload order: the system tries file_input first, then generic input[type=file], then upload_btn, then drop_zone. Only after all of those fail does it fall back to the Windows clipboard path, and it will only continue sending after the attachment state looks stable. That readiness check is now also configurable per site.

What to configure

For new sites, do not stop at enabled: true. You still need to confirm that the site has a usable upload_btn, file_input, or drop_zone selector, and also how the site signals that the attachment is really present in the composer.

You can now open Config -> Network listener mode -> Attachment send confirmation -> Advanced attachment rules and define site-specific readiness rules. The most useful fields are:

⚠️ Why the hint text matters: after the upload succeeds, the system appends a short reminder such as β€œfocus entirely on the file content” so the model does not ignore the attachment and only react to the short text in the box.

Gemini example: on sites like gemini.google.com, a preview chip or image preview is usually a stronger success signal than β€œthe network looks idle”. If failed uploads leave the send button gray or disabled, add those button tokens to send_button_disabled_markers and disable continue_once_on_unconfirmed_send to avoid sending before the attachment is really there.

Enabled by default in built-in presets

Practical advice: first confirm that the target site really supports file uploads, then make sure at least one reliable upload selector works, and only then test long prompts. Turning on the flag alone is usually not enough.

`; translations.sections['stealth-mode'] = `

πŸ›‘οΈ Stealth Mode (Low-Interference Operation)

Stealth mode makes clicks, cursor movement, scrolling, and timing behave more like gradual manual interaction so some sites are easier to drive reliably.

Core idea

Instead of β€œteleport and click immediately”, stealth mode uses smoother motion and pauses so page interaction is less abrupt.

ActionNormal modeStealth mode
ClickImmediate CDP commandPress -> tiny movement -> release
MoveInstant jumpBezier-like human motion
IdleNo movementSmall random drift
ScrollDirect callWheel-event style interaction
DelayMinimalRandomized 0.1-0.3 s

When to enable it

πŸ“ Where to enable it: select a site in the dashboard and check Stealth Mode at the top. That is the current UI label, and the setting is stored per preset.

DrissionPage patch (important)

This project applies a small DrissionPage patch so network monitoring can reuse the browser's main connection instead of opening extra ones, which improves compatibility.

⚠️ Important: re-apply the patch after every DrissionPage upgrade. The patch is idempotent, so repeated runs are safe.

⚠️ arena.ai note: even with stealth mode enabled and network monitoring disabled, repeated chatting can still trigger Cloudflare after roughly ten messages in half an hour. That indicates the site is simply a poor fit for long continuous test sessions, and lowering frequency is still the safer approach.

`; translations.sections['commands'] = `

⚑ Automation Commands

The command system lets you define triggers and actions so tabs can recover automatically, switch routes, or send alerts.

πŸ“ Where to configure it: open the dashboard β†’ Commands.

⚠️ Built-in commands: the project ships with several predefined commands, most of them disabled by default. Many of them are highly tailored to Gemini and Arena workflows. If you do not understand what a command does yet, leave it disabled.

Two modes

ModeDescriptionBest for
Simple modePick a trigger and configure an action chainCommon automation needs
Advanced modeWrite JavaScript or Python code directlyComplex custom logic

Main trigger types

TriggerDescriptionExample
request_countTotal requests hit a thresholdRun once every 10 turns
error_countConsecutive errors hit a thresholdRecover after 3 failures
idle_timeoutA tab stays idle for too longReclaim a tab after 5 minutes
page_checkSpecific text appears on the pageReact to Cloudflare prompts
command_triggeredFire after another command firesChain recovery steps
command_result_matchMatch the result of an upstream commandBranch on CSS_FAILED
network_request_errorIntercept bad network status codes by URL ruleReact to 429 or 5xx

πŸ’‘ page_check matching: it checks document.body.innerText first and falls back to document.title only when necessary. As of 2.5.9, you can also use || for OR and && for AND inside the match text field.

Scope and priority

Built-in actions

ActionDescription
clear_cookiesClear cookies for the current tab
refresh_pageRefresh the page
new_chatClick the new-chat button
run_jsExecute JavaScript in the page
waitWait for a number of seconds
execute_presetSwitch to a preset
execute_workflowRun a preset workflow immediately
navigateOpen a target URL
switch_proxySwitch proxy node through Clash
send_webhookSend an external alert
execute_command_groupRun a grouped command set in sequence
abort_taskStop the current task and optionally stop following actions

Branching and alerts

You can use command_result_match as a branch controller. It watches the result of another command and triggers only when the expected value is matched.

FieldMeaningSuggested usage
Observed commandThe upstream command to watchChoose one with stable outputs
Action refOptional specific step inside that commandUseful for JS probe steps
Ruleequals, contains, or not_equalsPrefer equals for status strings
Expected valueThe result you want to matchExamples: SUCCESS, CSS_FAILED

send_webhook supports alert templates such as {{tab_index}}, {{domain}}, {{network_status}}, and {{network_url}}.

{"msg":"Tab #{{tab_index}} on {{domain}} hit {{network_status}}, URL={{network_url}}"}

Proxy switching

Prerequisite: Clash must be running with External Controller enabled, for example:

external-controller: 127.0.0.1:9090
secret: ""
SettingDefaultDescription
Clash API URLhttp://127.0.0.1:9090External Controller address
Proxy groupProxyProxy group name in Clash
Switch modeRandomRandom, round-robin, or fixed node
Refresh after switchingEnabledRefresh the page after the node changes

Typical patterns

Advanced mode

// JavaScript example
document.cookie.split(";").forEach(c => {
    document.cookie = c.trim().split("=")[0] +
        "=;expires=Thu, 01 Jan 1970 00:00:00 UTC;path=/";
});
location.reload();
# Python example
logger.info(f"Current URL: {tab.url}")
if session.error_count > 2:
    tab.run_js("location.reload()")
    logger.info("Page refreshed after repeated errors")

⚠️ Safety: only use trusted scripts in advanced mode. Python scripts run in a restricted backend sandbox by default; if unsafe mode is explicitly enabled, they have full system access.

`; translations.sections['ai-recognition'] = `

🎯 AI Recognition (New Site Adaptation)

For sites outside the supported list, the system can call a helper AI to analyze the page and identify key elements such as the input box, send button, and reply container.

πŸ“ Where to configure it: open the dashboard β†’ Settings β†’ AI Recognition.

When you need it

How it works

The flow is simple: open an unknown site -> send the first real request -> the system asks a helper AI to analyze the page -> the generated selectors are written into the site config.

Default recognition targets

KeyDescriptionRequired
input_boxUser input fieldβœ…
send_btnSend buttonβœ…
result_containerContainer that holds AI output onlyβœ…
new_chat_btnButton that starts a new chat❌
message_wrapperOuter container for one full message❌
generating_indicatorVisible indicator shown while generating❌

Fields

FieldDescription
OrderControls recognition priority
KeyThe element identifier to search for, such as input_box or send_btn
DescriptionPlain-language guidance that helps the AI find the element accurately
EnabledWhether the recognition item is active
ActionsEdit or remove the item

Automatic flow

  1. Configure your own OpenAI-style helper API in the dashboard.
  2. Open the unsupported site and stay on the real chat page.
  3. Send the first real API request to that unknown domain.
  4. The system spends about 8000 tokens to analyze the page and writes the generated config into config/sites.json.

πŸ’‘ Tip: if you only use already supported sites, you can ignore this feature completely.

πŸ’‘ Manual flow: if you prefer not to configure a helper API, you can still let the project generate an empty site shell, then fill selectors manually with the selector tester or workflow visualizer.

`; translations.sections['env-config'] = `

βš™οΈ Environment Settings

Edit these in Dashboard β†’ Settings β†’ Environment. Changes here require a restart.

πŸ–₯️ Service

SettingDefaultDescription
Listen host127.0.0.1Use 0.0.0.0 to allow external access
Listen port8199HTTP service port
Debug modeOnEnables /docs and detailed error output
Log levelINFODEBUG, INFO, WARNING, or ERROR

πŸ” Authentication

SettingDefaultDescription
Enable authOffRequire a Bearer token for API calls
Bearer tokenEmptyMust be set when auth is enabled

🌐 CORS

SettingDefaultDescription
Enable CORSOnAllow cross-origin requests or not
Allowed origins*Comma-separated list, or * for all origins

πŸ”€ Proxy

SettingDefaultDescription
Enable proxyOffRoute browser traffic through a proxy
Proxy URLsocks5://127.0.0.1:1080Supports socks5:// and http://
Bypass listlocalhost,127.0.0.1Addresses that should skip the proxy

🌍 Browser

SettingDefaultDescription

🧳 Reuse your own browser profile

This is an advanced option. If you want the script to inherit your existing login state, cookies, and extensions, point it to a copied user-data directory rather than your live system Chrome profile.

⚠️ Important: starting from Chrome 136, Chrome tightened remote-debugging behavior. If you point BROWSER_PROFILE_DIR to the live system User Data folder, Chrome may open while the debugging port never becomes usable.

⚠️ Session-data reminder: copied browser profiles can contain login state, cookies, local cache, and extension data. Only copy your own local profile into a dedicated directory for local debugging. Do not upload it, commit it, or pass it to someone else.

Recommended approach
  1. Close every Chrome window completely.
  2. Create a dedicated directory such as C:\\Users\\YourName\\AppData\\Local\\UniversalWebApiProfile.
  3. Copy at least Local State and the profile folder you want into that new directory.
  4. Point the script to that copy in .env and restart start.bat.
BROWSER_PATH=C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe
BROWSER_PROFILE_DIR=C:\\Users\\YourName\\AppData\\Local\\UniversalWebApiProfile
BROWSER_PROFILE_NAME=Default

Field meaning:

Common mistake: do not set BROWSER_PROFILE_DIR to ...\\User Data\\Default. The directory should point to the root, while the exact profile name belongs in BROWSER_PROFILE_NAME.

If you do not need your own login state: the simplest option is to leave BROWSER_PROFILE_DIR empty and keep using the project's built-in chrome_profile/ directory.

πŸ€– Helper AI

SettingDefaultDescription
API KeyEmptyAPI key for the helper AI
Base URLhttp://127.0.0.1:5104/v1Base URL of the helper API
Modelgemini-3.0-proModel used for page analysis
Max HTML length120000Longer HTML is truncated to save tokens
`; translations.sections['browser-config'] = `

🌐 Browser Constants

Edit these in Dashboard β†’ Settings β†’ Browser Constants. Changes here take effect immediately.

πŸ”Œ Connection

SettingDefaultDescription
Debug port9222Chrome DevTools remote debugging port
Connection timeout10 sTimeout for connecting to the browser

⏱️ Interaction delays

Randomized delays that help the automation behave more like a human user

SettingDefaultDescription
Stealth delay min0.1 sMinimum stealth-mode delay
Stealth delay max0.3 sMaximum stealth-mode delay
Action delay min0.15 sMinimum delay for clicks and inputs
Action delay max0.3 sMaximum delay for clicks and inputs

πŸ” Element lookup

SettingDefaultDescription
Default wait3 sDefault timeout when searching for an element
Fallback wait1 sRetry timeout after the first failure
Cache lifetime5 sHow long cached element positions stay valid

πŸͺ„ Log presentation

These switches only change how logs read in the dashboard. They do not change runtime behavior, and the original log text is still preserved for troubleshooting.

SettingDefaultDescription
INFO cute modeOffPolishes common INFO logs into friendlier, easier-to-scan wording.
DEBUG cute modeOffPolishes the main DEBUG paths into more readable hints, such as β€œXiaolu starts splitting the text now”; useful when you stare at logs for a long time.

πŸ“‘ Response detection

Controls polling frequency and timeout thresholds while waiting for replies

SettingDefaultDescription
Check interval min0.1 sFastest polling interval
Check interval max1.0 sSlowest polling interval
Default interval0.3 sInitial polling interval
Silence timeout8.0 sMain finish condition when content stops changing
Silence fallback12 sExtra patience for slower models
Max timeout600 sAbsolute timeout for one request
Initial wait180 sMax wait before any response appears
Stable checks8How many unchanged checks are needed to finish

βš™οΈ Advanced response detection

Usually you do not need to change these values

SettingDefaultDescription
Re-render wait0.5 sExtra wait after page re-rendering
Shrink tolerance3Allowed number of content-shrink events
Minimum valid length10Shortest response considered valid
Initial element wait10 sHow long to wait for the response element to appear
Max anomaly count5Abort after too many anomalies
Max missing-element count10Abort after repeated missing-element checks

πŸ§ͺ Parser debug capture

Use these when you are developing or fixing a network parser. Captured files are written to logs/network_parser_debug/.

SettingDefaultDescription
Enable response debug captureOffWhen a network parser runs, save the raw body, request metadata, and parser debug summary for later inspection.
Max body chars200000Maximum raw response length to save per capture file. Raise this if the site streams long replies and the useful tail gets cut off.
Parser filterEmptyLeave blank to capture all parsers, or set a specific parser ID such as deepseek to reduce noise.

πŸ’‘ Recommended usage: when adapting a new site, enable parser debug capture first and reproduce one real reply. If no useful dump appears, then switch to the manual listener script from the tutorial's parser guide.

`; translations.sections['config-manage'] = `

πŸ’Ύ Config Management

πŸ› οΈ Update whitelist

Edit this in Dashboard β†’ Settings β†’ Update Whitelist. After you save it, the settings are written into config/update_settings.json and take effect during the next automatic update.

Default preserved items:

If all you want is to preserve login state and your own configuration, the default selection is usually enough.

⚠️ Warning: the visual editor currently has no undo feature. After saving, you cannot quickly revert changes unless you already have a backup.

`; translations.sections['faq'] = `

❓ FAQ

Q1: Why does SillyTavern say the connection failed?

A: The built-in API test often sends a request that is too short. This is especially common with AI Studio. In practice, it is better to send a real chat message instead of using the test button.

Q2: What should I check if failures happen frequently?

  1. Manual interference: do not click or switch things inside the controlled browser while the workflow is running.
  2. Collapsed UI or layout changes: if elements are hidden or folded, selectors may stop working.
  3. Website-side issues: captcha, blocked content, or messages that are too long can all cause failures.
  4. Network instability: proxy changes or unstable networking can cause deadlocks or partial sends.
  5. Extra unrelated tabs: when the script is about to run, the controlled browser should contain nothing except the target site.
  6. Outdated site config: website UI changes can invalidate selectors.

Q3: How does the script behave when I open multiple pages?

Q4: Why is a newly opened tab missing from the tab pool?

Q5: Do I need to tune dashboard parameters?

A: Usually not. Most defaults are already tuned for common usage.

Q6: What are the known issues?

Q7: Why is proxy switching not working?

  1. Make sure Clash is running and External Controller is enabled.
  2. Check whether the API URL is correct.
  3. Confirm the proxy-group name by visiting http://127.0.0.1:9090/proxies.
  4. If Clash uses a secret, fill it in inside the command config.
  5. Check [CMD] logs in the dashboard for exact failures.

Q8: Why does reusing my own Chrome login state still fail?

Q9: What is this project useful for?

πŸ“¬ Feedback channels:

`; translations.sections['author-note'] = `

⚠️ Notes From the Author

1️⃣ Function calling is still fragile

Function calling still has plenty of rough edges and depends heavily on the model's own ability to understand instructions. Treat it as a feature that needs testing, not as something you can trust blindly.

2️⃣ Gemini is the main maintenance target

The author mainly uses Gemini, so other sites may not receive timely updates. For problems, the QQ group is a better feedback channel than GitHub Issues or Discord.

3️⃣ Ask AI first when something breaks

Many issues do not require waiting for the author. Selector failures, wrong configs, and broken workflow order are often faster to diagnose by giving logs and element trees to another AI first.

4️⃣ Suspect selectors before parsers

When a site suddenly stops working, parser bugs are possible, but selector failures are more common.

Updating selectors is usually simple:

  1. Inspect the target element in the browser.
  2. Capture or copy the element tree.
  3. Ask an AI to suggest a new selector based on that structure.

Parser issues are harder: they often require network interception, response analysis, and reverse engineering.

If you can fix it yourself, please do: if you already solved the problem, sending the updated config or code back to the author is very helpful.

5️⃣ Clear bug reports are much easier to act on

If you report a bug, describe the issue clearly and attach DEBUG-level logs whenever possible. If wording is difficult, ask another AI to help organize the report first.

6️⃣ The tutorial is broad, not always deep

This tutorial tries to cover the major features, but some details are still brief. Contributions to improve the docs are welcome.

7️⃣ Many features were built for RP-style usage

A lot of this project's design comes from roleplay-oriented use cases. Features outside that core workflow may exist in a more lightly maintained state.

`; window.TUTORIAL_I18N_EN = translations; })();