дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 11:15:40 +02:00
feat(plugins): deliver batched filesystem events (#2049)
Closes #1948 Plugins receive debounced batches of files created, changed and removed outside the editor in open projects, as SDK `Event::FilesChanged` (delivered through `other("files-changed", …)`, so released WIT is unchanged), under the `events` capability and the plugin's path filters. Activation on these events requires API 1.3. Batches are coalesced per plugin through its actor, survive cancellation without losing deltas, and are dropped when the project or host shuts down. Co-authored-by: arnaud-ritti <[email protected]>
Цей коміт міститься в:
1 джерело
7ecb452350
коміт
63065bab64
123 files changed
+1832
-97
No files matched your search
@@ -3715,7 +3715,7 @@ export type ErrorKind = "notFound" | "alreadyExists" | "permissionDenied" | "inv
|
||||
"unavailable" | "io" | "protocol" | "internal";
|
||||
|
||||
/** Kinds of workbench events a plugin can subscribe to (`on-event:<kind>`). */
|
||||
export type EventKind = "file-opened" | "file-saved" | "editor-focused" | "action-performed" | "vcs-changed" | "scheduled";
|
||||
export type EventKind = "file-opened" | "file-saved" | "files-changed" | "editor-focused" | "action-performed" | "vcs-changed" | "scheduled";
|
||||
|
||||
/** An exception breakpoint filter offered by an adapter (`exceptionBreakpointFilters`). */
|
||||
export type ExceptionFilter = {
|
||||
@@ -3991,6 +3991,13 @@ export type FileTypeAssociation = {
|
||||
hashbangs?: string[],
|
||||
};
|
||||
|
||||
/** Debounced worktree changes. Paths use the same absolute form as `file-saved`. */
|
||||
export type FilesChanged = {
|
||||
created: string[],
|
||||
modified: string[],
|
||||
removed: string[],
|
||||
};
|
||||
|
||||
export type FoldKind = "region" | "comment" | "imports";
|
||||
|
||||
export type FoldRange = {
|
||||
@@ -8320,7 +8327,7 @@ export type WindowTab = {
|
||||
};
|
||||
|
||||
/** A workbench event delivered to plugins. */
|
||||
export type WorkbenchEvent = { kind: "fileOpened"; value: string } | { kind: "fileSaved"; value: string } | { kind: "editorFocused"; value: string | null } | { kind: "actionPerformed"; value: ActionPerformed } | { kind: "vcsChanged"; value: string } | { kind: "scheduled" };
|
||||
export type WorkbenchEvent = { kind: "fileOpened"; value: string } | { kind: "fileSaved"; value: string } | { kind: "filesChanged"; value: FilesChanged } | { kind: "editorFocused"; value: string | null } | { kind: "actionPerformed"; value: ActionPerformed } | { kind: "vcsChanged"; value: string } | { kind: "scheduled" };
|
||||
|
||||
export type WorkingTreeChange = {
|
||||
path: string,
|
||||
|
||||
@@ -296,7 +296,7 @@ function CapabilityRow({ cap, children }: { cap: CapabilityInfo; children?: Reac
|
||||
return (
|
||||
<li className={styles.item}>
|
||||
{children}
|
||||
<span className={styles.itemMain}>{cap.description}</span>
|
||||
<span className={styles.itemMain}>{tx(cap.description)}</span>
|
||||
<span className={styles.mono}>{cap.id}</span>
|
||||
<Badge tone={RISK_LABEL[cap.risk].tone}>{RISK_LABEL[cap.risk].label}</Badge>
|
||||
</li>
|
||||
|
||||
@@ -103,7 +103,7 @@ function ConsentDialog({ pending, onDone }: { pending: Pending; onDone: () => vo
|
||||
•
|
||||
</span>
|
||||
)}
|
||||
<span className={styles.itemMain}>{c.description}</span>
|
||||
<span className={styles.itemMain}>{tx(c.description)}</span>
|
||||
<span className={styles.mono}>{c.id}</span>
|
||||
<Badge tone={RISK_LABEL[c.risk].tone}>{RISK_LABEL[c.risk].label}</Badge>
|
||||
</li>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
"connect_timeout must be greater than zero": "connect_timeout must be greater than zero",
|
||||
"database connection is closed": "database connection is closed",
|
||||
"Database": "Database",
|
||||
"Observe editor, filesystem and version control events": "Observe editor, filesystem and version control events",
|
||||
"Run `{command}` in a terminal.": "Run `{command}` in a terminal.",
|
||||
"Run `{command}` in a terminal and sign in.": "Run `{command}` in a terminal and sign in.",
|
||||
"{name} needs you to sign in. {hint}": "{name} needs you to sign in. {hint}",
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"commit or roll back before clearing the selected database": "清除所选数据库前,请先提交或回滚事务",
|
||||
"connect_timeout must be greater than zero": "connect_timeout 必须大于零",
|
||||
"database connection is closed": "数据库连接已关闭",
|
||||
"Observe editor, filesystem and version control events": "监听编辑器、文件系统和版本控制事件",
|
||||
"Run `{command}` in a terminal.": "在终端中运行 `{command}`。",
|
||||
"Run `{command}` in a terminal and sign in.": "在终端中运行 `{command}` 并登录。",
|
||||
"{name} needs you to sign in. {hint}": "{name} 需要你登录。{hint}",
|
||||
|
||||
Reference in new issue
Заблокувати користувача