| 224 | } |
| 225 | |
| 226 | function getConvertAndEnhancePrompt(args: Record<string, string> | undefined): GetPromptResult { |
| 227 | const sourcePath = args?.source_path || 'notebook.ipynb' |
| 228 | |
| 229 | return { |
| 230 | description: 'Workflow for converting and enhancing a notebook', |
| 231 | messages: [ |
| 232 | { |
| 233 | role: 'user', |
| 234 | content: { |
| 235 | type: 'text', |
| 236 | text: `Convert and enhance the notebook at: ${sourcePath} |
| 237 | |
| 238 | Follow this workflow: |
| 239 | |
| 240 | 1. **Convert to Deepnote format**: |
| 241 | Use ${TOOL_NAMES.convertTo} with inputPath: "${sourcePath}" |
| 242 | Format will be auto-detected from content. |
| 243 | |
| 244 | 2. **Inspect the result**: |
| 245 | Use ${TOOL_NAMES.read} with include: ["structure", "stats"]. |
| 246 | |
| 247 | 3. **Enhance with interactivity and docs**: |
| 248 | Use ${TOOL_NAMES.addBlock} and ${TOOL_NAMES.editBlock} to: |
| 249 | - Add markdown documentation between code sections |
| 250 | - Replace hardcoded values with input widgets |
| 251 | - Add section headers and summary blocks |
| 252 | |
| 253 | 4. **Check for issues**: |
| 254 | Use ${TOOL_NAMES.read} with include: ["lint", "dag"] to find undefined variables and dependency issues. |
| 255 | |
| 256 | 5. **Run and inspect outputs**: |
| 257 | Use ${TOOL_NAMES.run} and then ${TOOL_NAMES.snapshotLoad} using the returned snapshotPath. |
| 258 | |
| 259 | The result will be a well-documented, interactive Deepnote notebook.`, |
| 260 | }, |
| 261 | }, |
| 262 | ], |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | function getFixAndDocumentPrompt(args: Record<string, string> | undefined): GetPromptResult { |
| 267 | const notebookPath = args?.notebook_path || 'notebook.deepnote' |