Skip to content

Commit cf3f111

Browse files
authored
Refactor tools property in CommercetoolsAgentEssentials
Refactor CommercetoolsAgentEssentials by removing redundant tools property initialization.
1 parent bc32628 commit cf3f111

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

typescript/src/mastra/essentials.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ import {AuthConfig} from '../types/auth';
1212

1313
class CommercetoolsAgentEssentials {
1414
private _commercetools: CommercetoolsAPI;
15-
16-
tools: {[key: string]: Tool};
15+
private _tools: {[key: string]: Tool}; = {};
1716

1817
constructor({
1918
authConfig,
@@ -29,8 +28,6 @@ class CommercetoolsAgentEssentials {
2928
processedConfiguration.context
3029
);
3130

32-
this.tools = {};
33-
3431
contextToTools(processedConfiguration.context)
3532
.filter((tool) => isToolAllowed(tool, processedConfiguration))
3633
.forEach((tool) => {

0 commit comments

Comments
 (0)