diff --git a/samples/annotated.js b/samples/annotated.js index 30c1600..e1fb4a7 100644 --- a/samples/annotated.js +++ b/samples/annotated.js @@ -1,13 +1,15 @@ /** - * Determines if a child table extends a parent table - * - * This function checks the table hierarchy to determine if the specified child table - * is an extension of the parent table. It uses the TableUtils API to examine the - * table relationships in the system. - * - * @param {string} parent - The name of the parent table to check - * @param {string} child - The name of the child table to verify as an extension + * Determines if one table extends another in the ServiceNow database schema + * + * @function isTableExtended + * @param {string} parent - The name of the potential parent table + * @param {string} child - The name of the potential child table * @returns {boolean} True if the child table extends the parent table, false otherwise + * @example + * // Check if the incident table extends the task table + * if(isTableExtended('task', 'incident')) { + * gs.info('Incident extends task'); + * } */ function isTableExtended(parent, child){ gs.include("j2js"); diff --git a/src/snowdoc/llm_jsdoc.py b/src/snowdoc/llm_jsdoc.py index 6698fa3..9599354 100644 --- a/src/snowdoc/llm_jsdoc.py +++ b/src/snowdoc/llm_jsdoc.py @@ -157,6 +157,7 @@ def run_gemini(system_prompt, user_prompt): • Infer missing param / return types (string, number, boolean, GlideRecord, Array, Object, Date). • Any function whose name starts with “_” is private (`@private`). +• Include an `@example` usage block demonstrating how to instantiate and use the Script Include. • Never include method bodies when operating in `signature` mode.""" USER_PROMPT_TEMPLATE = """