Skip to content

Commit df5eaeb

Browse files
author
Jicheng Lu
committed
refine utility structure
1 parent 02ae283 commit df5eaeb

File tree

4 files changed

+151
-227
lines changed

4 files changed

+151
-227
lines changed

src/lib/helpers/types/agentTypes.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,20 @@
131131

132132
/**
133133
* @typedef {Object} AgentUtility
134+
* @property {string} category
134135
* @property {string} name
135136
* @property {boolean} disabled
136137
* @property {string?} [visibility_expression]
137-
* @property {import('$commonTypes').NameBase[]} functions
138-
* @property {import('$commonTypes').NameBase[]} templates
138+
* @property {UtilityItem[]} items
139+
*/
140+
141+
/**
142+
* @typedef {Object} UtilityItem
143+
* @property {string} function_name
144+
* @property {string?} [function_display_name]
145+
* @property {string?} [template_name]
146+
* @property {string?} [template_display_name]
147+
* @property {string?} [visibility_expression]
139148
*/
140149

141150
/**

src/lib/helpers/utils/common.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ export function formatObject(object) {
5454

5555

5656
/**
57-
* @param {string?} str
58-
* @param {string?} prefix
57+
* @param {string | null | undefined} str
58+
* @param {string | null | undefined} prefix
5959
*/
6060
export function truncateByPrefix(str, prefix) {
6161
if (!str || !prefix) {

0 commit comments

Comments
 (0)