Conversation
- Remove examples/self_analysis.exs - Add examples/chat.exs: interactive REPL with session management, slash commands (/new, /sessions, /use, /messages, /info, /health, /providers, /files, /diff, /delete, /quit), auto-managed server, and token usage display - Add examples/hello.exs (previously untracked) - Update README.md examples section Amp-Thread-ID: https://ampcode.com/threads/T-019c3c29-4d31-753d-b705-fd98b8e99c0f Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a888c7e526
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Get a specific session | ||
| {:ok, session} = OpenCode.Generated.Session.session_get("session-id", client) |
There was a problem hiding this comment.
Use Operations.session_get/2 in docs
The README example shows OpenCode.Generated.Session.session_get("session-id", client), but OpenCode.Generated.Session is a generated struct module and does not define session_get/2; the operation lives in OpenCode.Generated.Operations. Anyone copy/pasting this snippet will get an undefined function error at compile time. The table above also lists Session.session_get, which has the same issue. Please update the example (and table) to Operations.session_get/2 to match the SDK API.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@codex Please recheck and verify. session_get and session_children do live on OpenCode.Generated.Session
Align documented fields with generated FilePart and PatchPart structs: - file: filename, url, mime, source (not path, content) - patch: files, hash (not path, content) Amp-Thread-ID: https://ampcode.com/threads/T-019c3c29-4d31-753d-b705-fd98b8e99c0f Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1731b3a91f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
session_messages returns items shaped %{info: ..., parts: ...} where
role lives inside info, not at the top level.
Amp-Thread-ID: https://ampcode.com/threads/T-019c3c29-4d31-753d-b705-fd98b8e99c0f
Co-authored-by: Amp <amp@ampcode.com>
…amples Docs/improve readme and examples
No description provided.