@happy-nut/monacori 0.1.2 → 0.1.5

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/dist/server.js CHANGED
@@ -108,6 +108,12 @@ export function serveDiffWatch(input) {
108
108
  });
109
109
  return;
110
110
  }
111
+ // Compact in-place refresh payload — the poller fetches this only when the signature changed.
112
+ if (requestUrl.pathname === "/__ai_flow_update") {
113
+ const latest = lastBuild ?? build();
114
+ writeHttpJson(response, latest.update ?? {});
115
+ return;
116
+ }
111
117
  if (requestUrl.pathname === "/__http_send" && request.method === "POST") {
112
118
  void handleHttpProxy(request, response);
113
119
  return;
package/dist/types.d.ts CHANGED
@@ -35,6 +35,7 @@ export type DiffFile = {
35
35
  status: string;
36
36
  binary: boolean;
37
37
  hunks: DiffHunk[];
38
+ vcs?: "new" | "edited" | "staged";
38
39
  };
39
40
  export type SourceFile = {
40
41
  path: string;
@@ -48,6 +49,7 @@ export type SourceFile = {
48
49
  signature: string;
49
50
  skippedReason?: string;
50
51
  image?: string;
52
+ vcs?: "new" | "edited" | "staged";
51
53
  };
52
54
  export type HttpSendRequest = {
53
55
  method: string;
@@ -76,12 +78,24 @@ export type DiffReviewResult = {
76
78
  files: number;
77
79
  hunks: number;
78
80
  };
81
+ export type DiffReviewUpdate = {
82
+ signature: string;
83
+ generatedAt: string;
84
+ diffContainer: string;
85
+ changesPanel: string;
86
+ filesTree: string;
87
+ reviewStatus: string;
88
+ fileStates: ReviewFileState[];
89
+ sourceFilesMeta: SourceFile[];
90
+ httpEnvironments: Record<string, Record<string, string>>;
91
+ };
79
92
  export type DiffReviewBuild = {
80
93
  html: string;
81
94
  files: number;
82
95
  hunks: number;
83
96
  signature: string;
84
97
  generatedAt: string;
98
+ update?: DiffReviewUpdate;
85
99
  lazyBodies?: string[];
86
100
  lazySourceData?: string;
87
101
  };