mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
Restrict generated app-server imports
This commit is contained in:
parent
3f70f0b160
commit
a16de17100
1 changed files with 64 additions and 0 deletions
|
|
@ -95,6 +95,44 @@ const nonChatImperativeDomBridgeFiles = [
|
|||
"src/shared/ui/ui-root.tsx",
|
||||
];
|
||||
const nonUiEventListenerFiles = ["src/shared/lifecycle/abortable.ts"];
|
||||
const generatedAppServerImportLegacyFiles = [
|
||||
"src/features/chat/chat-state-actions.ts",
|
||||
"src/features/chat/chat-state.ts",
|
||||
"src/features/chat/composer/controller.ts",
|
||||
"src/features/chat/diagnostics.ts",
|
||||
"src/features/chat/display/agent.ts",
|
||||
"src/features/chat/display/goal-messages.ts",
|
||||
"src/features/chat/display/hooks.ts",
|
||||
"src/features/chat/display/labels.ts",
|
||||
"src/features/chat/display/permission-details.ts",
|
||||
"src/features/chat/display/plan.ts",
|
||||
"src/features/chat/display/review.ts",
|
||||
"src/features/chat/display/state.ts",
|
||||
"src/features/chat/display/thread-items.ts",
|
||||
"src/features/chat/inbound/controller.ts",
|
||||
"src/features/chat/inbound/notification-plan.ts",
|
||||
"src/features/chat/inbound/routing.ts",
|
||||
"src/features/chat/mcp-status.ts",
|
||||
"src/features/chat/requests/approval.ts",
|
||||
"src/features/chat/requests/user-input.ts",
|
||||
"src/features/chat/runtime/config.ts",
|
||||
"src/features/chat/runtime/effective-settings.ts",
|
||||
"src/features/chat/runtime/state.ts",
|
||||
"src/features/chat/runtime/status-summary.ts",
|
||||
"src/features/chat/session/connection-controller.ts",
|
||||
"src/features/chat/threads/thread-goal-actions.ts",
|
||||
"src/features/chat/threads/thread-history-controller.ts",
|
||||
"src/features/chat/threads/thread-rename-controller.ts",
|
||||
"src/features/chat/threads/thread-resume-controller.ts",
|
||||
"src/features/chat/threads/thread-resume.ts",
|
||||
"src/features/chat/turns/composer-submission-actions.ts",
|
||||
"src/features/chat/turns/slash-command-actions.ts",
|
||||
"src/features/chat/turns/slash-command-execution.ts",
|
||||
"src/features/chat/turns/turn-submission-controller.ts",
|
||||
"src/features/chat/turns/turn-submission.ts",
|
||||
"src/features/chat/ui/goal-banner.tsx",
|
||||
"src/features/chat/ui/pending-request-message.tsx",
|
||||
];
|
||||
const codexPanelEslintPlugin = {
|
||||
rules: {
|
||||
"no-self-referential-initializer-callback": {
|
||||
|
|
@ -421,6 +459,32 @@ export default defineConfig([
|
|||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["src/**/*.{ts,tsx}"],
|
||||
ignores: ["src/app-server/**/*.{ts,tsx}", "src/features/chat/app-server/**/*.{ts,tsx}", ...generatedAppServerImportLegacyFiles],
|
||||
rules: {
|
||||
"no-restricted-imports": [
|
||||
"error",
|
||||
{
|
||||
patterns: [
|
||||
{
|
||||
group: [
|
||||
"src/generated/app-server/**",
|
||||
"../generated/app-server/**",
|
||||
"../../generated/app-server/**",
|
||||
"../../../generated/app-server/**",
|
||||
"../../../../generated/app-server/**",
|
||||
"../../../../../generated/app-server/**",
|
||||
"../../../../../../generated/app-server/**",
|
||||
],
|
||||
message:
|
||||
"Keep generated app-server types behind src/app-server or the chat app-server adapter; expose Panel-owned models to feature, UI, and reducer code.",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
{
|
||||
files: ["src/app-server/**/*.{ts,tsx}"],
|
||||
rules: {
|
||||
|
|
|
|||
Loading…
Reference in a new issue