Skip to content

Conversation

@remorses
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings September 14, 2025 07:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request implements a comprehensive session compaction system for opencode along with various UI/UX improvements. The main purpose is to optimize memory usage and improve performance by automatically summarizing long conversation histories when they approach model context limits.

  • Adds automatic session compaction with overflow detection and summarization
  • Implements session state management improvements for better concurrency handling
  • Introduces various UI enhancements including theme updates, version bumps, and better error handling

Reviewed Changes

Copilot reviewed 138 out of 144 changed files in this pull request and generated no comments.

Show a summary per file
File Description
theme.json Adds a new comprehensive theme configuration with color scheme definitions
packages/opencode/src/session/compaction.ts Core session compaction logic with overflow detection and summarization
packages/opencode/src/session/prompt.ts Major refactor extracting prompt handling from session index with improved state management
packages/opencode/src/session/index.ts Streamlined session management focusing on core CRUD operations
Various package.json files Version bumps from 0.7.1 to 0.8.0/0.9.0 across multiple packages
packages/web/src/components/share/part.tsx UI improvements with duplicate code block
Multiple documentation files Text corrections and improvements to CLI references
Comments suppressed due to low confidence (1)

packages/web/src/components/share/part.tsx:182

  • Duplicate code block detected. Lines 177-182 are identical to lines 171-176. Remove the duplicate block.
        {props.message.role === "user" && props.part.type === "file" && (
          <div data-component="attachment">
            <div data-slot="copy">Attachment</div>
            <div data-slot="filename">{props.part.filename}</div>
          </div>
        )}
        {props.message.role === "user" && props.part.type === "file" && (
          <div data-component="attachment">
            <div data-slot="copy">Attachment</div>
            <div data-slot="filename">{props.part.filename}</div>
          </div>
        )}

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chatgpt-codex-connector
Copy link

Codex Review: Here are some suggestions.

const queued = state().queued.get(input.sessionID) ?? []
if (!result.blocked && !result.info.error) {
if ((await stream.finishReason) === "tool-calls") {
continue
}
const unprocessed = queued.filter((x) => x.messageID > result.info.id)
if (unprocessed.length) {
continue
}
}
for (const item of queued) {
item.callback(result)
}

[P1] Return queued prompts with their own results

When a session is busy, additional prompt calls enqueue callbacks but do not capture any per‑request context beyond the message ID. After the active generation finishes, the loop at the end resolves every queued callback with the same result from the final iteration rather than the assistant message that corresponds to each queued user message. In a situation where two or more prompts arrive while one is running, the first caller will receive the response to the last prompt, and its own reply is never surfaced to the caller even though it was generated and stored. Consider draining the queue one item at a time so each Promise resolves with the matching assistant message.

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, or 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 fix this CI failure" or "@codex address that feedback".

@thdxr thdxr force-pushed the opentui branch 4 times, most recently from 8ec2c0a to 98307ee Compare September 19, 2025 21:21
@thdxr thdxr force-pushed the opentui branch 2 times, most recently from fe22e8c to 256dead Compare September 28, 2025 09:03
@thdxr thdxr force-pushed the opentui branch 3 times, most recently from 740e09f to 7913f4a Compare October 5, 2025 05:29
@thdxr thdxr force-pushed the opentui branch 2 times, most recently from a256056 to 7510ad3 Compare October 25, 2025 05:10
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.