Repository navigation
feat(acp): support attachments and align chat interactions - #811
Merged
Merged
Conversation
akazwz
marked this pull request as ready for review
July 15, 2026 13:49
akazwz
force-pushed
the
feat/acp-optimization
branch
from
July 16, 2026 05:05
d3adfce to
366edfa
Compare
sheepbox8646
approved these changes
Jul 16, 2026
ChrAlpha
added a commit
to ChrAlpha/Memoh
that referenced
this pull request
Jul 24, 2026
…tion Mechanical layer: accepted directory-rename relocations (conversation/flow -> agent/application, contextfrag -> agent/context/ fragment, historyfrag -> agent/context/history, compaction -> agent/ context/compaction, contextlimit -> agent/context/limit, pipeline -> chat/timeline, acpagent -> agent/runtime/acp, conversation -> agent/turn, message -> chat/message, session -> chat/thread), moved the 17 restack files left at the old internal/agent root into runtime/native, and swept import paths/identifiers (Resolver->Service, req.SessionID->ThreadID, conversation aliases) across 109+ files. Semantic resolutions: - application/service.go: restack's resolve() semantics under felinics#856 naming; kept felinics#847 ForkContextSourceMessageIDs and felinics#808/felinics#845 workspace-target notice as unions; ResolveRunConfigResult regains ContextBudgetMaxTokens. - prepareRunConfig: query materialization stays OWNED by the context view (ContextQueryMaterialized contract) — main's eager append-to-Messages block was not adopted; hook texts + system sections restored. - service_acp: union of restack's ContextView ACP sections/lifecycle/ budget with upstream felinics#811 attachments, felinics#821 reasoning effort and leading-user cleanup; busy-turn gate ordered before attachment resolution; persistACPRound keeps the lifecycle parameter. - continuation/user-input/tool-approval: resumeAgentSession abstraction kept, workspace-target threading added (ctx + ChatRequest); stage-1 budget-trim signals ported into service_continuation.go. - Broke two illegal layer edges introduced by relocation: turn no longer imports chat/timeline (forwardedFromValue inlined) and agent/context/ fragment no longer imports turn (kind literals inlined); moved DiscussContextBuilder/DiscussContextInput from chat/timeline into contextview to satisfy the timeline-only-depends-on-turn arch guard. - cmd/internal/core/providers.go now wires ContextViewApplier and LoopReselectMode (previously silently unwired in composition); discuss path gained ContextBudgetMaxTokens/lifecycle/tool-exchange threading with stale ContextSourceFrags cleared before pumpDiscussNative. - Known gap carried forward: the discuss ContextView builder cannot attach at the turn.Service transport boundary (RC/TR richness is flattened before the command); discuss ACP keeps the designed fallback prompt. - sqlc/swagger/sdk regenerated; deltas vs main are restack's net additions (context lifecycle queries/API/types, messages session_mode columns).
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.
这次改了什么
这次补齐 ACP 会话的附件能力,并统一 ACP 与 Memoh Agent 在聊天页上的主要交互。用户继续使用原有的附件入口和模型选择器,不新增“上传图片”入口,也不增加功能开关。
附件
聊天界面
默认 Agent
实现说明
content_hash解析 Agent 可访问的引用;落入备用存储的文件会按需提升到工作区可访问的主存储。rename原子提交,避免暴露未写完的文件。acpfeedback返回对应错误码和 i18n key。测试
go test ./...pnpm exec vitest run --project web:79 个测试文件、845 个测试全部通过pnpm --filter @memohai/web buildmise run lintCloses #805
Closes #789
Follow-up: #812