Skip to content

docs(examples): show startup content capture with configure - #172

Merged
apucacao merged 3 commits into
mainfrom
cursor/capture-content-example-7168
Oct 15, 2026
Merged

apucacao merged 3 commits into
mainfrom
cursor/capture-content-example-7168

Conversation

@apucacao

@apucacao apucacao commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Adds a standalone example that turns conversation content on for the process with configure(options=SDKOptions(capture_content=True)) before init_client and the first AI call. The registered handlers are built with no capture_content argument.

It is not wired into main.py.


Note

Overview
Adds a capture-content example that turns on process-wide conversation content capture with configure(options=SDKOptions(capture_content=True)) before the first config(...).invoke, using handlers from the global registry that do not set capture_content themselves (per-handler factory flags would override this default).

main.py registers the example under capture-content and documents the CLI usage alongside the other examples.

Reviewed by Cursor Bugbot for commit f5fa6fa. Bugbot is set up for automated code reviews on this repo. Configure here.

Add a standalone example that calls configure once before the first AI
invocation. Handlers are built without a capture_content argument.
@apucacao

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

Comment thread examples/capture_content.py
The capture example imported the registry at module load, so provider
clients were constructed before .env was read.
@apucacao

Copy link
Copy Markdown
Contributor Author

bugbot run

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 87c3d67. Configure here.

@jeffdupont jeffdupont left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configure(options=SDKOptions(capture_content=...)) matches the lazy resolution in types.py (effective_capture_content), so calling it after handler registration is correct. Nit, non-blocking: this is the only example with its own __main__ instead of an entry in main.py.

Drop the example's own entrypoint and register it with the other examples.
@apucacao
apucacao merged commit 8494453 into main Oct 15, 2026
7 checks passed
@apucacao
apucacao deleted the cursor/capture-content-example-7168 branch October 15, 2026 18:11
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.

3 participants