Creator App Tests / PR Spam Gate (push) Skipped
Frontend Tests / PR Spam Gate (push) Skipped
NPM Format (website & console) / PR Spam Gate (push) Skipped
Pre-commit Checks / PR Spam Gate (push) Skipped
QwenPaw Creator Plugin Release / check-version (push) Canceled after 0s
QwenPaw Creator Plugin Release / upload-oss (push) Canceled after 0s
Tests / PR Spam Gate (push) Skipped
CodeQL / CodeQL (python) (push) Canceled after 0s
CodeQL / CodeQL (typescript) (push) Canceled after 0s
Creator App Tests / Creator Backend Tests (push) Canceled after 0s
Creator App Tests / Creator UI Build & Tests (push) Canceled after 0s
E2E Smoke Tests / Playwright UI Smoke (push) Canceled after 0s
Frontend Tests / Detect console changes (push) Canceled after 0s
NPM Format (website & console) / website format check (push) Canceled after 0s
NPM Format (website & console) / console format check (push) Canceled after 0s
Pre-commit Checks / Pre-commit (push) Canceled after 0s
QwenPaw Data Plugin Release / check-version (push) Canceled after 0s
Tests / Detect code changes (push) Canceled after 0s
Frontend Tests / Vitest Unit Tests (push) Canceled after 0s
Frontend Tests / Frontend Summary (push) Canceled after 0s
QwenPaw Data Plugin Release / upload-oss (push) Canceled after 0s
Tests / Maintainer Approval (push) Canceled after 0s
Tests / Unit Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Unit Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - macos-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.13 - ubuntu-latest (push) Canceled after 0s
Tests / Contract Tests - py3.11 - windows-latest (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - macos-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - fallback (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.13 - ubuntu-latest - p2 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p0 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p1 (push) Canceled after 0s
Tests / Integrated Tests - py3.11 - windows-latest - p2 (push) Canceled after 0s
Tests / Coverage Report (push) Canceled after 0s
Tests / Test Summary (push) Canceled after 0s
56 lines
2.0 KiB
TypeScript
56 lines
2.0 KiB
TypeScript
import { createRoot } from "react-dom/client";
|
|
import App from "./App.tsx";
|
|
import "./i18n";
|
|
import { installHostExternals } from "./plugins/hostExternals";
|
|
// Bare side-effect imports: each file self-registers its data into
|
|
// menuRegistry / routeRegistry so consumers' first render sees them.
|
|
import "./layouts/registry/builtinMenu";
|
|
import "./layouts/registry/builtinRoutes.tsx";
|
|
|
|
// Expose host dependencies (React, antd, etc.) on window
|
|
// so that plugin UI modules can use them without bundling their own copies.
|
|
installHostExternals();
|
|
|
|
if (typeof window !== "undefined") {
|
|
// Prevent the browser/WebView from navigating away (replacing the whole
|
|
// app) when a file is dropped outside a drop zone like the chat sender.
|
|
// The Tauri window disables native drag-drop interception so OS file
|
|
// drags reach the page as HTML5 drag events; any drop not consumed by a
|
|
// drop zone would otherwise open the file directly. Drop zones stop
|
|
// propagation, so this only sees unhandled drops. Scoped to file drags
|
|
// to keep element drag-and-drop (e.g. queue reordering) untouched.
|
|
const isFileDrag = (e: DragEvent) =>
|
|
!!e.dataTransfer && Array.from(e.dataTransfer.types).includes("Files");
|
|
window.addEventListener("dragover", (e) => {
|
|
if (isFileDrag(e)) e.preventDefault();
|
|
});
|
|
window.addEventListener("drop", (e) => {
|
|
if (isFileDrag(e)) e.preventDefault();
|
|
});
|
|
|
|
const originalError = console.error;
|
|
const originalWarn = console.warn;
|
|
|
|
console.error = function (...args: unknown[]) {
|
|
const msg = args[0]?.toString() || "";
|
|
if (msg.includes(":first-child") || msg.includes("pseudo class")) {
|
|
return;
|
|
}
|
|
originalError.apply(console, args as []);
|
|
};
|
|
|
|
console.warn = function (...args: unknown[]) {
|
|
const msg = args[0]?.toString() || "";
|
|
if (
|
|
msg.includes(":first-child") ||
|
|
msg.includes("pseudo class") ||
|
|
msg.includes("potentially unsafe")
|
|
) {
|
|
return;
|
|
}
|
|
originalWarn.apply(console, args as []);
|
|
};
|
|
}
|
|
|
|
createRoot(document.getElementById("root")!).render(<App />);
|