Conversation
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| 🔵 In progress View logs |
my-code | 5ff99e5 | Feb 28 2026, 07:43 AM |
There was a problem hiding this comment.
Pull request overview
This PR moves the “runtime” implementation into a workspace package (@my-code/runtime) and updates the Next.js app to consume it via package imports, while adding/expanding language runtimes (Pyodide/Ruby/JS worker + Wandbox C++/Rust) and shared runtime interfaces.
Changes:
- Introduce
packages/runtimeas a workspace package and refactor app imports to@my-code/runtime/*. - Split runtime concerns into dedicated modules (
interface.ts,languages.ts,context.tsx, terminal/editor/repl utilities). - Add new worker runtimes (Ruby WASM, Pyodide worker, JS eval worker) and Wandbox C++/Rust helpers (stacktrace/panic filtering).
Reviewed changes
Copilot reviewed 29 out of 52 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Add TS path aliases for @my-code/runtime/* and samples. |
| scripts/copyAllDTSFiles.ts | Switch compiler options import to @my-code/runtime/typescript/runtime. |
| packages/runtime/src/worker/runtime.tsx | Update runtime type imports (split languages/interface). |
| packages/runtime/src/worker/ruby/init.rb | Add Ruby stdout/stderr forwarding via JS globals. |
| packages/runtime/src/worker/ruby.worker.ts | Add Ruby WASM worker implementation. |
| packages/runtime/src/worker/ruby.ts | Update runtime interface import location. |
| packages/runtime/src/worker/pyodide/execfile.py | Add Python helper to exec a file in Pyodide FS. |
| packages/runtime/src/worker/pyodide/check_syntax.py | Add Python-side syntax checking helper. |
| packages/runtime/src/worker/pyodide.worker.ts | Add Pyodide worker implementation. |
| packages/runtime/src/worker/pyodide.ts | Update runtime interface import location. |
| packages/runtime/src/worker/jsEval.worker.ts | Add JS eval worker implementation. |
| packages/runtime/src/worker/jsEval.ts | Update runtime interface import location. |
| packages/runtime/src/wandbox/rust/prog.rs | Add Rust wrapper to tag panic hook output. |
| packages/runtime/src/wandbox/rust.ts | Add Rust Wandbox execution + trace filtering. |
| packages/runtime/src/wandbox/runtime.tsx | Update runtime type imports (split languages/interface). |
| packages/runtime/src/wandbox/cpp/_stacktrace.cpp | Add C++ signal handler + Boost stacktrace emitter. |
| packages/runtime/src/wandbox/cpp.ts | Add C++ Wandbox execution + stacktrace filtering and compiler selection. |
| packages/runtime/src/wandbox/api.ts | Update RuntimeInfo import location. |
| packages/runtime/src/typescript/runtime.tsx | Update runtime interface import location. |
| packages/runtime/src/tests.ts | Update runtime type imports (split languages/interface). |
| packages/runtime/src/terminal.tsx | Add shared xterm terminal utilities + hook. |
| packages/runtime/src/repl.tsx | Update runtime hook/type imports (now via context/languages/interface). |
| packages/runtime/src/languages.ts | Add RuntimeLang, getRuntimeLang, and langConstants. |
| packages/runtime/src/interface.ts | Add RuntimeContext/RuntimeInfo and emptyMutex. |
| packages/runtime/src/icons.tsx | Update RuntimeLang import source. |
| packages/runtime/src/highlight.ts | Update RuntimeLang import source. |
| packages/runtime/src/exec.tsx | Update useRuntime/RuntimeLang import sources. |
| packages/runtime/src/embedContext.tsx | Add shared embed context for files/repl outputs/exec results. |
| packages/runtime/src/editor.tsx | Update langConstants import source. |
| packages/runtime/src/context.tsx | Add new useRuntime + RuntimeProvider composition. |
| packages/runtime/samples/sub.rs | Add runtime sample file. |
| packages/runtime/samples/sub.h | Add runtime sample file. |
| packages/runtime/samples/sub.cpp | Add runtime sample file. |
| packages/runtime/samples/main2.ts | Add runtime sample file. |
| packages/runtime/samples/main2.rs | Add runtime sample file. |
| packages/runtime/samples/main.rb | Add runtime sample file. |
| packages/runtime/samples/main.py | Add runtime sample file. |
| packages/runtime/samples/main.js | Add runtime sample file. |
| packages/runtime/samples/main.cpp | Add runtime sample file. |
| packages/runtime/package.json | Add workspace package definition for @my-code/runtime. |
| packages/runtime/README.md | Update docs to reflect interface.ts/context.tsx/languages.ts. |
| package.json | Move runtime-related deps out of root; keep TypeScript as devDependency. |
| package-lock.json | Reflect workspace package addition + dependency moves. |
| app/terminal/runtime.tsx | Remove old in-app runtime module (moved to workspace package). |
| app/terminal/page.tsx | Update imports to use @my-code/runtime/* and runtime samples. |
| app/sidebar.tsx | Update icon/lang imports to @my-code/runtime/*. |
| app/layout.tsx | Use @my-code/runtime providers (embed + runtime). |
| app/actions/chatActions.ts | Update repl type imports to @my-code/runtime/repl. |
| app/[lang]/[pageId]/markdown.tsx | Update editor/exec/repl/runtime-lang imports to @my-code/runtime/*. |
| app/[lang]/[pageId]/chatForm.tsx | Update embed context import to @my-code/runtime/embedContext. |
| README.md | Update docs to reference packages/runtime/* paths. |
| Dockerfile | Ensure packages/runtime/package.json is copied before npm ci. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "private": true, | ||
| "type": "module", | ||
| "exports": { | ||
| "./*": "./src/*", |
There was a problem hiding this comment.
exports の "./*": "./src/*" はサブパス解決先が拡張子なしになり、Node/tsx の ESM 解決では ./src/worker/pyodide のような実在しないパスになって import が失敗し得ます(例: scripts/copyAllDTSFiles.ts の @my-code/runtime/typescript/runtime)。利用しているエントリポイント(./terminal, ./repl, ./worker/pyodide, ./typescript/runtime, ./wandbox/runtime など)を拡張子付きで明示的に exports に列挙するか、src/index.ts を用意して "." だけを export する形にして解決エラーを防いでください。
| "./*": "./src/*", | |
| "./terminal": "./src/terminal.ts", | |
| "./repl": "./src/repl.ts", | |
| "./worker/pyodide": "./src/worker/pyodide.ts", | |
| "./typescript/runtime": "./src/typescript/runtime.ts", | |
| "./wandbox/runtime": "./src/wandbox/runtime.ts", |
No description provided.