Skip to content

Docs/improve readme and examples#2

Merged
UtkarshUsername merged 5 commits intodevfrom
docs/improve-readme-and-examples
Feb 8, 2026
Merged

Docs/improve readme and examples#2
UtkarshUsername merged 5 commits intodevfrom
docs/improve-readme-and-examples

Conversation

@UtkarshUsername
Copy link
Copy Markdown
Owner

No description provided.

UtkarshUsername and others added 2 commits February 8, 2026 13:02
- 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>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +112 to +113
# Get a specific session
{:ok, session} = OpenCode.Generated.Session.session_get("session-id", client)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

@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>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

UtkarshUsername and others added 2 commits February 8, 2026 13:51
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>
@UtkarshUsername UtkarshUsername merged commit bdc12c9 into dev Feb 8, 2026
UtkarshUsername added a commit that referenced this pull request Feb 8, 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.

1 participant