Skip to content

Conversation

@rgbkrk
Copy link
Member

@rgbkrk rgbkrk commented Oct 8, 2025

WIP

rgbkrk added 5 commits October 8, 2025 10:42
- Add IPython-based completion support to Python runtime shell
- Extend worker protocol with get_completions message handler
- Add getCompletions method to PyodideRuntimeAgent
- Create Python completion source for CodeMirror integration
- Wire completion to ExecutableCell for code cells with Python runtime
- Add comprehensive plan and TODO documentation

Provides context-aware Python completions without LiveStore events,
using direct worker communication for multi-user safe autocomplete.
- Add detailed console logging to track completion flow
- Add visual debug indicator for completion source status
- Add Tab key support for accepting completions
- Improve completion keymap handling
- Add getCurrentPyodideAgent method to ConsoleLauncher
- Expose method on global __RUNT_LAUNCHER__ interface
- Update ExecutableCell to use proper public method
- Should fix completion access to Pyodide runtime agent
- Add get_completions to runt_runtime.py imports and __all__
- Should make the function available in Python runtime global scope
- Fixes NameError when trying to call get_completions from worker
- Add get_completions to globals() in setupIPythonEnvironment
- Makes completion function available for worker execution
- Should fix NameError when calling get_completions from worker
rgbkrk added 5 commits October 8, 2025 10:56
- Import json module and use json.dumps() to return JSON string
- Matches pattern used by get_registered_tools() function
- Should fix JSON parsing error in worker completion handler
- Improve cursor position parsing and line detection
- Add execution context to IPython completer via shell.user_ns
- Add fallback completion for Python builtins when IPython fails
- Add comprehensive debug logging for troubleshooting
- Should now provide basic completions for common Python functions
- Improve namespace sync between global and IPython shell
- Add Jedi completion as fallback for module attributes
- Add manual module attribute completion with namespace lookup
- Add common module completions for math, numpy, pandas, etc.
- Should now handle 'import math; math.' completion cases
- Allow CodeMirror completion after dot even with no partial text
- Fix backend parsing for empty partial attributes
- Add comprehensive debugging for completion request flow
- Limit large attribute lists to first 20 items
- Should fix 'math.' completion triggering
- Rename second beforeCursor to charBeforeCursor to avoid conflict
- Fixes TypeScript compilation error
@markmiro
Copy link
Contributor

I merged a change that would allow us to bind shortcuts to the Tab key here: #628

In short, the React wrapper for CodeMirror added extensions even when the extensions array was empty and basicSetup was false. So I had to disable the indentWithTab option and then add it back in a way where we can bind to the shortcut and have it get triggered

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants