Skip to content

feat(gemini): add deep-research workflow and docs export result#778

Merged
jackwener merged 5 commits intojackwener:mainfrom
backtomyfuture:codex/gemini-deep-research-pr
Apr 4, 2026
Merged

feat(gemini): add deep-research workflow and docs export result#778
jackwener merged 5 commits intojackwener:mainfrom
backtomyfuture:codex/gemini-deep-research-pr

Conversation

@backtomyfuture
Copy link
Copy Markdown
Contributor

@backtomyfuture backtomyfuture commented Apr 4, 2026

Summary

  • add gemini deep-research command to start Gemini Deep Research from a prompt and return the started conversation URL
  • add gemini deep-research-result command to export Deep Research output via Share & Export -> Export to Docs and return the Google Docs URL
  • extend Gemini utility helpers with robust conversation selection, tool selection, confirm-button polling, and Docs URL extraction (including Drive upload response id fallback)
  • improve deep-research submission reliability by verifying prompt submission after send, retrying once when submission is not detected, and returning submit-not-found when both attempts fail
  • support newer Deep Research confirm labels in Gemini UI (including phrases like Generate research plan / 生成研究计划)
  • improve deep-research-result behavior for in-progress sessions: when export URL is not yet available and research is still running, return a waiting message instead of a misleading no-docs error
  • add/expand adapter tests for new commands, submit retry/failure paths, confirm label compatibility, export URL picking behavior, and in-progress result handling

Behavior Changes

  • opencli gemini deep-research "<prompt>" -f json
    • now validates that submission actually happened
    • retries once automatically if submit did not stick
    • may return:
      • started
      • tool-not-found
      • submit-not-found
      • confirm-not-found
  • opencli gemini deep-research-result "<conversation-url>" -f json
    • returns Docs URL when export succeeds
    • returns Deep Research is still running. Please wait and retry later. when the research job is still in progress
    • returns no-docs guidance only when not in running state and no export URL is found

Verification

  • npx tsc --noEmit
  • npx vitest run --project adapter src/clis/gemini
  • npm run build
  • node dist/main.js gemini deep-research "今日10条AI相关新闻" -f json
  • node dist/main.js gemini deep-research-result "https://gemini.google.com/app/<conversation-id>" -f json

@jackwener jackwener force-pushed the codex/gemini-deep-research-pr branch from 468e7a5 to d32aa4a Compare April 4, 2026 19:09
@jackwener jackwener merged commit 4e2b314 into jackwener:main Apr 4, 2026
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.

2 participants