Conversation
…nputs-registration
…nputs-registration
|
⏭️ No files to mutate for |
|
⏭️ No files to mutate for |
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 96.43% | 27/28 |
| 🟢 | Branches | 86.96% | 20/23 |
| 🟢 | Functions | 100% | 5/5 |
| 🟢 | Lines | 96.43% | 27/28 |
Test suite run success
11 tests passing in 2 suites.
Report generated by 🧪jest coverage report action from c0e2d79
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 100% | 129/129 |
| 🟢 | Branches | 100% | 47/47 |
| 🟢 | Functions | 100% | 27/27 |
| 🟢 | Lines | 100% | 120/120 |
Test suite run success
75 tests passing in 7 suites.
Report generated by 🧪jest coverage report action from c0e2d79
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟡 | Statements | 70.97% | 22/31 |
| 🔴 | Branches | 20% | 1/5 |
| 🟡 | Functions | 75% | 6/8 |
| 🟡 | Lines | 68.97% | 20/29 |
Test suite run success
4 tests passing in 1 suite.
Report generated by 🧪jest coverage report action from c0e2d79
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 92.51% | 358/387 |
| 🟢 | Branches | 85.51% | 118/138 |
| 🟢 | Functions | 98.15% | 53/54 |
| 🟢 | Lines | 92.41% | 353/382 |
Test suite run success
117 tests passing in 7 suites.
Report generated by 🧪jest coverage report action from c0e2d79
Coverage report for
|
St.❔ |
Category | Percentage | Covered / Total |
|---|---|---|---|
| 🟢 | Statements | 99.8% | 988/990 |
| 🟢 | Branches | 98.98% | 292/295 |
| 🟢 | Functions | 97.45% | 229/235 |
| 🟢 | Lines | 99.79% | 948/950 |
Test suite run success
538 tests passing in 25 suites.
Report generated by 🧪jest coverage report action from c0e2d79
|
⏭️ No files to mutate for |
There was a problem hiding this comment.
Pull request overview
This PR consolidates tool static configuration into a single static options property across tool types (block/inline/tune), updating SDK typings and core tool registration/initialization paths accordingly.
Changes:
- Introduces canonical option-key enums and per-tool
*ToolOptionsinterfaces, and updates tool constructor types to usestatic options. - Updates SDK facades to read tool configuration from
constructable.options(and to narrowuseToolOptionstypings per tool kind). - Updates Core tool registration flow (
Core.use,ToolsManager.prepareTools,ToolsFactory) to acceptToolStaticOptionsas the tool settings shape.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/sdk/src/tools/facades/InlineToolFacade.ts | Switches inline tool title lookup to static options and narrows useToolOptions typing. |
| packages/sdk/src/tools/facades/BlockToolFacade.ts | Reads block tool static settings from constructable.options and narrows useToolOptions typing. |
| packages/sdk/src/tools/facades/BaseToolFacade.ts | Removes legacy internal settings enums, adds option-key re-exports, and uses constructable.options for merged options/config. |
| packages/sdk/src/entities/BaseTool.ts | Defines shared BaseToolOptionKey, BaseToolOptions, ToolStaticOptions, and updates BaseToolConstructor to carry typed options. |
| packages/sdk/src/entities/InlineTool.ts | Adds InlineToolOptionKey + InlineToolOptions and updates InlineToolConstructor to use typed static options. |
| packages/sdk/src/entities/BlockTool.ts | Adds BlockToolOptionKey + BlockToolOptions and updates BlockToolConstructor to use typed static options. |
| packages/sdk/src/entities/BlockTune.ts | Adds BlockTuneOptions and updates BlockTuneConstructor to use typed static options. |
| packages/sdk/src/entities/index.ts | Re-exports BaseTool types to make the new option/type surface available via entities index. |
| packages/core/src/tools/ToolsManager.ts | Updates prepareTools signature to accept ToolStaticOptions settings for tool preparation. |
| packages/core/src/tools/ToolsFactory.ts | Updates tool settings model to be ToolStaticOptions + class, and adapts registration to accept optional options. |
| packages/core/src/tools/internal/inline-tools/link/index.ts | Migrates Link inline tool static title to static options and adds explicit tool name. |
| packages/core/src/tools/internal/inline-tools/italic/index.ts | Migrates Italic inline tool static title to static options and adds explicit tool name. |
| packages/core/src/tools/internal/inline-tools/bold/index.ts | Migrates Bold inline tool static title to static options and adds explicit tool name. |
| packages/core/src/index.ts | Updates Core.use and tool initialization wiring to use ToolStaticOptions for per-tool settings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ToolConstructable, | ||
| ToolStaticOptions |
| const blockTools = this.#plugins.getAll<[BlockToolConstructor, ToolStaticOptions]>(ToolType.Block); | ||
| const inlineTools = this.#plugins.getAll<[InlineToolConstructor, ToolStaticOptions]>(ToolType.Inline); | ||
| const blockTunes = this.#plugins.getAll<[BlockTuneConstructor, ToolStaticOptions]>(ToolType.Tune); |
| */ | ||
| public get title(): string | undefined { | ||
| return this.constructable[InternalInlineToolSettings.Title]; | ||
| return this.constructable.options?.[InlineToolOptionKey.Title]; |
Move all tool's static configuration properties to the single options property