Skip to content

Commit 7d34a53

Browse files
authored
Add predefined docs if available (#22)
1 parent 57fab47 commit 7d34a53

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/javascript-kernel/src/executor.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,15 @@ export class JavaScriptExecutor {
878878
detailLevel
879879
);
880880

881+
// Add predefined documentation if available
882+
const doc = this.getBuiltinDocumentation(expression);
883+
if (doc) {
884+
const mdContent = inspectionData['text/markdown'] || '';
885+
inspectionData['text/markdown'] = mdContent + `\n\n---\n\n${doc}`;
886+
const plainContent = inspectionData['text/plain'] || '';
887+
inspectionData['text/plain'] = plainContent + `\n\nDoc: ${doc}`;
888+
}
889+
881890
return {
882891
status: 'ok',
883892
found: true,

0 commit comments

Comments
 (0)