diff --git a/ui/src/notebooks/context/notebook.tsx b/ui/src/notebooks/context/notebook.tsx index efe893dedbb..19ea6f73800 100644 --- a/ui/src/notebooks/context/notebook.tsx +++ b/ui/src/notebooks/context/notebook.tsx @@ -74,6 +74,16 @@ export const NotebookProvider: FC = ({children}) => { return pipes.slice() } } + + if ( + pipe.type === 'query' && + pipes.filter(p => p.type === 'query').length + ) { + pipe.queries[0].text = + '// tip: use the __PREVIOUS_RESULT__ variable to link your queries\n\n' + + pipe.queries[0].text + } + if (pipes.length && pipe.type !== 'query') { _setResults(add({...results[results.length - 1]})) _setMeta(