mirror of
https://github.com/larksuite/cli.git
synced 2026-09-14 18:42:53 +08:00
8e6f031337
Sheet edits routinely regress on style inheritance, formula semantics and row heights because the agent never opens the governing skill reference. This change points the calling agent at the right reference from inside the command output it is already parsing: - internal/beforeyouedit: process-level notice slot (mirrors internal/deprecation), registered with the output package from init so it also surfaces in embedder distributions that assemble the tree via cmd.Build without running the root entry point's setupNotices. - internal/output: RegisterBuiltinNotice + GetNotice now merges the entry-point-wired PendingNotice hook with builtin providers. - shortcuts/register: wrapSheetsBeforeYouEdit decorates 9 sheet commands (import/create, table-put/csv-put/cells-set, batch-update, dim-insert, workbook-info/sheet-info) with per-intent guidance, same Validate/Execute/OnInvoke pattern as wrapSheetsBackwardDeprecation; existing OnInvoke hooks are chained, not replaced. Verified: go test ./internal/beforeyouedit ./internal/output ./shortcuts; a real binary dry-run shows _notice.before_you_edit in the JSON envelope, and a unit test pins the PendingNotice=nil (embedder) path.