Conversation
Recover squash-related files from dangling stash commit: - squash tool implementation and utils - squash, discard-extract, discard-squash, extract-squash, all prompt variants - system and nudge prompts for all tool combinations
- Add ulid dependency for generating unique IDs - Replace timestamp-based ID counter with ulid - Ensures unique IDs across parallel operations
- Move squashSummaries out of prune object to top-level state - Add resetOnCompaction utility to clear stale state after compaction - Move findLastCompactionTimestamp and countTurns to state/utils.ts - Update isMessageCompacted to also check prune.messageIds - Update persistence to save/load squashSummaries at top level
- Move findStringInMessages, collectToolIdsInRange, collectMessageIdsInRange from squash.ts to tools/utils.ts for reusability - Keep squash.ts focused on tool definition and execution logic - Follows existing pattern where collectContentInRange lives in utils.ts
When opencode runs with OPENCODE_SERVER_PASSWORD set, the server requires HTTP Basic Auth. This adds auth utilities to detect secure mode and configure the SDK client with an interceptor that injects the Authorization header on all requests. Fixes #304
…of creating new ones
- revert terse PR 313 style back to verbose prose format from dev branch - clarify tool triggers: discard/extract for individual outputs, squash for phases - remove 'task complete' trigger from discard/extract (exclusive to squash) - add instruction to not use discard/extract without prunable-tools list - replace 'task/sub-task' terminology with 'phase' to avoid conflict with Task tool
- Use tool part injection for DeepSeek/Kimi (requires reasoning_content in assistant messages) - Use text part injection for other models (cleaner approach) - Add prunedMessageCount to context breakdown display
refactor(prompts): dcp prompt system + prompt dx cli + new tool names
- Change toolIds and messageIds from string[] to Set<string> - Update all .includes() to .has(), .push() to .add(), .length to .size - Add serialization layer in persistence.ts for JSON compatibility - Remove redundant Set wrappers now that state is already a Set - Fix session initialization order in dcp commands - Fix token calculation for pruned tools
feat: support toast notifications via pruneNotificationType
Remove hybrid injection strategy that used synthetic assistant messages for most models while special-casing DeepSeek/Kimi with tool parts. Now uses tool part injection universally when last message is assistant.
Python CLI tools for analyzing OpenCode session data: - opencode-dcp-stats: DCP cache impact analysis - opencode-find-session: find sessions by title - opencode-session-timeline: per-step token timeline - opencode-token-stats: aggregate token usage stats
Remove model-specific branching (DeepSeek/Kimi check) and unused helper functions. Now all non-user-message injections use synthetic tool parts appended to the last message, eliminating ~100 lines of code.
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is created to verify that the CLA Assistant bot is correctly configured and responding to new Pull Requests.