inplan 0.3.8 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/app/main/index.cjs
CHANGED
|
@@ -95,6 +95,9 @@ var CONTROL_LOG_VERSION = 1;
|
|
|
95
95
|
var LogEventType = {
|
|
96
96
|
EditorPid: "editor_pid",
|
|
97
97
|
ModeChanged: "mode_changed",
|
|
98
|
+
CommentCreated: "comment_created",
|
|
99
|
+
CommentModified: "comment_modified",
|
|
100
|
+
CommentDeleted: "comment_deleted",
|
|
98
101
|
DocumentEdited: "document_edited",
|
|
99
102
|
TurnEnded: "turn_ended",
|
|
100
103
|
AgentRevised: "agent_revised",
|
|
@@ -886,9 +889,10 @@ class Session {
|
|
|
886
889
|
console.warn("inplan: could not read the pending proposal for review dispatch:", e);
|
|
887
890
|
});
|
|
888
891
|
}
|
|
892
|
+
const isAgentFileChange = (e) => e.actor === "agent" && (e.type === LogEventType.DocumentEdited || e.type === LogEventType.CommentCreated || e.type === LogEventType.CommentModified || e.type === LogEventType.CommentDeleted);
|
|
889
893
|
let applied;
|
|
890
894
|
for (let i = entries.length - 1; i >= 0 && !applied; i--) {
|
|
891
|
-
if (entries[i]
|
|
895
|
+
if (isAgentFileChange(entries[i])) applied = entries[i];
|
|
892
896
|
}
|
|
893
897
|
if (applied && node_fs.existsSync(this.paths.file)) {
|
|
894
898
|
const via = applied.payload?.via;
|
|
@@ -47467,6 +47467,7 @@ function App(props = {}) {
|
|
|
47467
47467
|
}
|
|
47468
47468
|
),
|
|
47469
47469
|
draftPendingModel !== null && bodyEmpty && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "ap-banner", role: "status", children: [
|
|
47470
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "ap-spinner-sm", "aria-hidden": "true" }),
|
|
47470
47471
|
t2("banner.draftPending", { model: draftPendingModel }),
|
|
47471
47472
|
" ",
|
|
47472
47473
|
/* @__PURE__ */ jsxRuntimeExports.jsx("button", { className: "ap-link", onClick: () => setDraftPendingModel(null), children: t2("banner.dismiss") })
|
|
@@ -45,6 +45,7 @@ body {
|
|
|
45
45
|
/* Centred, with a spinner: the old top-left grey "Loading…" read as an empty document. */
|
|
46
46
|
.ap-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; height: 100vh; height: 100dvh; color: var(--muted); }
|
|
47
47
|
.ap-spinner { width: 28px; height: 28px; border: 3px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: ap-spin 0.8s linear infinite; }
|
|
48
|
+
.ap-spinner-sm { width: 14px; height: 14px; border: 2px solid var(--line-strong); border-top-color: var(--accent); border-radius: 50%; animation: ap-spin 0.8s linear infinite; flex-shrink: 0; }
|
|
48
49
|
@keyframes ap-spin { to { transform: rotate(360deg); } }
|
|
49
50
|
@media (prefers-reduced-motion: reduce) { .ap-spinner { animation-duration: 2.4s; } }
|
|
50
51
|
|
package/app/renderer/index.html
CHANGED
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
content="default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' inplan-plugin:; img-src 'self' file: https:; connect-src 'self' inplan-plugin: ws://127.0.0.1:* ws://localhost:*; frame-src https://inplan.ai http://127.0.0.1:* http://localhost:*"
|
|
22
22
|
/>
|
|
23
23
|
<title>inplan</title>
|
|
24
|
-
<script type="module" crossorigin src="./assets/index-
|
|
25
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
24
|
+
<script type="module" crossorigin src="./assets/index-BXB1lexl.js"></script>
|
|
25
|
+
<link rel="stylesheet" crossorigin href="./assets/index-RtdWGNC5.css">
|
|
26
26
|
</head>
|
|
27
27
|
<body>
|
|
28
28
|
<div id="root"></div>
|
package/bin/cli.js
CHANGED
|
@@ -4834,6 +4834,13 @@ async function main() {
|
|
|
4834
4834
|
mayResolve: hasFlag(args, "may-resolve")
|
|
4835
4835
|
});
|
|
4836
4836
|
writeFileSync10(file, nextText);
|
|
4837
|
+
const p = docPaths(file);
|
|
4838
|
+
mkdirSync10(p.controlDir, { recursive: true });
|
|
4839
|
+
await new FsControlChannel(p).append({
|
|
4840
|
+
actor: "agent",
|
|
4841
|
+
type: LogEventType.CommentCreated,
|
|
4842
|
+
payload: { id: comment.id }
|
|
4843
|
+
});
|
|
4837
4844
|
output({ status: "commented", id: comment.id, date: comment.date, author: comment.author });
|
|
4838
4845
|
} catch (err) {
|
|
4839
4846
|
if (err instanceof AddCommentError) {
|