fix: restore preview image in README#57
Merged
luokerenx4 merged 8 commits intomasterfrom Mar 14, 2026
Merged
Conversation
ClaudeCodeProvider and AgentSdkProvider were calling extractMediaFromToolResultContent inside onToolResult, then forwarding the same content string via tool_result events. AgentCenter's unified pipeline would extract again, causing persistMedia to be called twice for the same file and duplicate image blocks in the session. Fix: remove extraction from both providers; done.media is now always []. AgentCenter remains the single extraction point for tool_result content, consistent with the "shared logic lives in AgentCenter" design. Add A17 regression test that asserts persistMedia is called exactly once when tool_result content contains a MEDIA marker and provider done.media is empty. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ckAIProvider GenerateProvider used a verb as identifier, making it harder to read at a glance. Renamed to AIProvider to match the Connector pattern in connectors/types.ts (noun-as-identity, no prefix). Add src/ai-providers/mock.ts with MockAIProvider (analogous to connectors/mock.ts / MockConnector): captures generateCalls and askCalls for test assertions, configurable inputKind/providerTag/askResult. Also exports event builder helpers (textEvent, toolUseEvent, etc.) previously buried in __tests__/pipeline/helpers.ts. Simplify helpers.ts to re-export MockAIProvider as FakeProvider for backward compatibility with existing pipeline tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ai-providers/mock.ts → ai-providers/mock/index.ts connectors/mock.ts → connectors/mock/index.ts Mirrors the directory-per-concern pattern used by all other modules in these packages (vercel-ai-sdk/, claude-code/, agent-sdk/, web/, telegram/, etc.), and gives each mock room to grow without a single flat file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… vitest config - Add vitest.config.ts with @/ alias (→ src/) so tests can use absolute imports - Merge src/core/provider-utils.ts + src/ai-providers/log-tool-call.ts into src/ai-providers/utils.ts — all shared provider utilities now in one place - Move provider-utils.spec.ts → ai-providers/utils.spec.ts - Update imports in agent-center.ts and all three provider implementations - Fix vi.mock in 5 test files: switch to @/ path + importOriginal to preserve real stripImageData/buildChatHistoryPrompt implementations Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Matches the project's XxxManager naming convention for files that orchestrate multiple implementations of a standard interface (AgentCenter, ConnectorCenter, etc.) rather than being one themselves. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Remove CLAUDE.md from .gitignore so project context is shared across contributors and machines. Add a note warning not to put sensitive information in it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add and extend spec files across core and extension modules: - core/config.spec.ts (new): loadJsonFile, parseAndSeed, writeConfigSection, readAIBackend/writeAIBackend, loadTradingConfig (new-format + legacy migration) - core/compaction.spec.ts: compactIfNeeded (none/microcompact/full paths), forceCompact - core/session.spec.ts: MemorySessionStore/SessionStore UUID chaining, readActive, restore(), filesystem I/O - core/tool-center.spec.ts: getVercelTools/getMcpTools disabled-list filtering - ai-providers/vercel-ai-sdk/vercel-provider.spec.ts (new): agent cache invalidation, disabledTools filtering, modelOverride bypass, generate() error path - extension/news-collector/rss-parser.spec.ts: fetchAndParseFeed network retry paths - extension/trading/adapter.spec.ts (new): resolveAccounts/resolveOne, searchContracts aggregation, getPortfolio filtering - extension/trading/factory.spec.ts: createAlpacaFromConfig/createCcxtFromConfig - extension/trading/providers/alpaca/AlpacaAccount.spec.ts: init retries, placeOrder, getPositions - extension/trading/providers/ccxt/CcxtAccount.spec.ts (new): searchContracts sorting and filtering, cancelOrder cache, placeOrder notional conversion Overall: 714 tests passing, statements 61.98% → 73.93%, branches 51.35% → 61.80% Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Restores the missing preview image (
docs/images/preview.png) and compresses it from 513 KB to 59 KB.Closes #56
🤖 Generated with Claude Code