Skip to content

feat:add streaming API interceptor for background tab compatibility and add plugin link#549

Open
AstaTus wants to merge 2 commits intojackwener:mainfrom
AstaTus:main
Open

feat:add streaming API interceptor for background tab compatibility and add plugin link#549
AstaTus wants to merge 2 commits intojackwener:mainfrom
AstaTus:main

Conversation

@AstaTus
Copy link
Copy Markdown

@AstaTus AstaTus commented Mar 28, 2026

Description

A:
add new plugin about gemini-web
see: https://github.com/AstaTus/opencli-plugin-gemini-web

B:
feat: add streaming API interceptor for background tab compatibility
Adds streaming-capable network interception that works in background
browser tabs where requestAnimationFrame is throttled. This enables
capturing streaming API responses (e.g., Gemini's StreamGenerate XHR)
without relying on DOM rendering.

Key changes:

  • New generateStreamingInterceptorJs() with fetch ReadableStream + XHR
    onprogress/readystatechange dual capture
  • New waitForStreamCaptureJs() with configurable timeout and done-waiting
  • sendCommand() now accepts optional timeoutMs (default 30s)
  • IPage extended with installStreamingInterceptor/getStreamedResponses/
    waitForStreamCapture methods
  • New stream-intercept pipeline step for YAML pipelines
  • XHR completion uses full responseText overwrite via readystatechange
    to guarantee data completeness

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Related issue:

Type of Change

  • 🐛 Bug fix
  • [*] ✨ New feature
  • 🌐 New site adapter
  • [*] 📝 Documentation
  • ♻️ Refactor
  • 🔧 CI / build / tooling

Checklist

  • I ran the checks relevant to this PR
  • I updated tests or docs if needed
  • I included output or screenshots when useful

Documentation (if adding/modifying an adapter)

  • Added doc page under docs/adapters/ (if new adapter)
  • Updated docs/adapters/index.md table (if new adapter)
  • Updated sidebar in docs/.vitepress/config.mts (if new adapter)
  • Updated README.md / README.zh-CN.md when command discoverability changed
  • Used positional args for the command's primary subject unless a named flag is clearly better
  • Normalized expected adapter failures to CliError subclasses instead of raw Error

Screenshots / Output

@AstaTus AstaTus changed the title add gemini-web plugin link feat(doc)add gemini-web plugin link Mar 28, 2026
AstaTus and others added 2 commits March 28, 2026 21:50
Adds streaming-capable network interception that works in background
browser tabs where requestAnimationFrame is throttled. This enables
capturing streaming API responses (e.g., Gemini's StreamGenerate XHR)
without relying on DOM rendering.

Key changes:
- New generateStreamingInterceptorJs() with fetch ReadableStream + XHR
  onprogress/readystatechange dual capture
- New waitForStreamCaptureJs() with configurable timeout and done-waiting
- sendCommand() now accepts optional timeoutMs (default 30s)
- IPage extended with installStreamingInterceptor/getStreamedResponses/
  waitForStreamCapture methods
- New stream-intercept pipeline step for YAML pipelines
- XHR completion uses full responseText overwrite via readystatechange
  to guarantee data completeness

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AstaTus AstaTus changed the title feat(doc)add gemini-web plugin link feat:add streaming API interceptor for background tab compatibility and add plugin link Mar 28, 2026
@AstaTus
Copy link
Copy Markdown
Author

AstaTus commented Mar 28, 2026

after this pr merge , I will update opencli-plugin-gemini-web ,the new opencli-plugin-gemini-web uses streaming API interceptor

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