@lijian-ui/dsh-file-manager 0.1.20
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/LICENSE +38 -0
- package/README.i18n.yaml +6 -0
- package/README.md +66 -0
- package/README.zh.md +66 -0
- package/cordis.patch.yml +13 -0
- package/lib/assets/mermaid.min.js +3587 -0
- package/lib/client.js +7621 -0
- package/lib/client.js.map +1 -0
- package/lib/index.js +3207 -0
- package/lib/tsconfig.client.tsbuildinfo +1 -0
- package/lib/tsconfig.host.tsbuildinfo +1 -0
- package/lib/types/client/FileManagerSettingsCard.d.ts +56 -0
- package/lib/types/client/FileManagerSettingsCard.d.ts.map +1 -0
- package/lib/types/client/PluginSettingsCard.d.ts +104 -0
- package/lib/types/client/PluginSettingsCard.d.ts.map +1 -0
- package/lib/types/client/api.d.ts +75 -0
- package/lib/types/client/api.d.ts.map +1 -0
- package/lib/types/client/chat/AttachedFilesDock.d.ts +51 -0
- package/lib/types/client/chat/AttachedFilesDock.d.ts.map +1 -0
- package/lib/types/client/chat/file-ref.d.ts +35 -0
- package/lib/types/client/chat/file-ref.d.ts.map +1 -0
- package/lib/types/client/chat/mermaid-chat.d.ts +30 -0
- package/lib/types/client/chat/mermaid-chat.d.ts.map +1 -0
- package/lib/types/client/chat/placeholder-hint.d.ts +16 -0
- package/lib/types/client/chat/placeholder-hint.d.ts.map +1 -0
- package/lib/types/client/components/ExplorerPanel.d.ts +26 -0
- package/lib/types/client/components/ExplorerPanel.d.ts.map +1 -0
- package/lib/types/client/components/FileIcon.d.ts +15 -0
- package/lib/types/client/components/FileIcon.d.ts.map +1 -0
- package/lib/types/client/components/ScmPanel.d.ts +23 -0
- package/lib/types/client/components/ScmPanel.d.ts.map +1 -0
- package/lib/types/client/components/a11y.d.ts +12 -0
- package/lib/types/client/components/a11y.d.ts.map +1 -0
- package/lib/types/client/components/icons.d.ts +41 -0
- package/lib/types/client/components/icons.d.ts.map +1 -0
- package/lib/types/client/components/overlay.d.ts +45 -0
- package/lib/types/client/components/overlay.d.ts.map +1 -0
- package/lib/types/client/drag/DragFileInlay.d.ts +31 -0
- package/lib/types/client/drag/DragFileInlay.d.ts.map +1 -0
- package/lib/types/client/drag/file-drag.d.ts +47 -0
- package/lib/types/client/drag/file-drag.d.ts.map +1 -0
- package/lib/types/client/drag.d.ts +31 -0
- package/lib/types/client/drag.d.ts.map +1 -0
- package/lib/types/client/file-source.d.ts +29 -0
- package/lib/types/client/file-source.d.ts.map +1 -0
- package/lib/types/client/fileType.d.ts +31 -0
- package/lib/types/client/fileType.d.ts.map +1 -0
- package/lib/types/client/floating.d.ts +27 -0
- package/lib/types/client/floating.d.ts.map +1 -0
- package/lib/types/client/hooks/useResizableSplit.d.ts +37 -0
- package/lib/types/client/hooks/useResizableSplit.d.ts.map +1 -0
- package/lib/types/client/hooks/useStore.d.ts +10 -0
- package/lib/types/client/hooks/useStore.d.ts.map +1 -0
- package/lib/types/client/index.d.ts +57 -0
- package/lib/types/client/index.d.ts.map +1 -0
- package/lib/types/client/layout.d.ts +104 -0
- package/lib/types/client/layout.d.ts.map +1 -0
- package/lib/types/client/locales.d.ts +125 -0
- package/lib/types/client/locales.d.ts.map +1 -0
- package/lib/types/client/maximize.d.ts +24 -0
- package/lib/types/client/maximize.d.ts.map +1 -0
- package/lib/types/client/mention.d.ts +44 -0
- package/lib/types/client/mention.d.ts.map +1 -0
- package/lib/types/client/mount.d.ts +22 -0
- package/lib/types/client/mount.d.ts.map +1 -0
- package/lib/types/client/persist.d.ts +55 -0
- package/lib/types/client/persist.d.ts.map +1 -0
- package/lib/types/client/picker/FilePickerModal.d.ts +47 -0
- package/lib/types/client/picker/FilePickerModal.d.ts.map +1 -0
- package/lib/types/client/picker/file-picker.d.ts +62 -0
- package/lib/types/client/picker/file-picker.d.ts.map +1 -0
- package/lib/types/client/preview/PreviewPanel.d.ts +17 -0
- package/lib/types/client/preview/PreviewPanel.d.ts.map +1 -0
- package/lib/types/client/preview/PreviewTabs.d.ts +30 -0
- package/lib/types/client/preview/PreviewTabs.d.ts.map +1 -0
- package/lib/types/client/preview/PreviewToolbar.d.ts +37 -0
- package/lib/types/client/preview/PreviewToolbar.d.ts.map +1 -0
- package/lib/types/client/preview/content.d.ts +43 -0
- package/lib/types/client/preview/content.d.ts.map +1 -0
- package/lib/types/client/preview/markdown.d.ts +60 -0
- package/lib/types/client/preview/markdown.d.ts.map +1 -0
- package/lib/types/client/preview/mermaid.d.ts +78 -0
- package/lib/types/client/preview/mermaid.d.ts.map +1 -0
- package/lib/types/client/preview/selection.d.ts +26 -0
- package/lib/types/client/preview/selection.d.ts.map +1 -0
- package/lib/types/client/reference.d.ts +75 -0
- package/lib/types/client/reference.d.ts.map +1 -0
- package/lib/types/client/settings-form.d.ts +206 -0
- package/lib/types/client/settings-form.d.ts.map +1 -0
- package/lib/types/client/store.d.ts +279 -0
- package/lib/types/client/store.d.ts.map +1 -0
- package/lib/types/core/types.d.ts +132 -0
- package/lib/types/core/types.d.ts.map +1 -0
- package/lib/types/host/fs-service.d.ts +96 -0
- package/lib/types/host/fs-service.d.ts.map +1 -0
- package/lib/types/host/gate.d.ts +45 -0
- package/lib/types/host/gate.d.ts.map +1 -0
- package/lib/types/host/git-runner.d.ts +80 -0
- package/lib/types/host/git-runner.d.ts.map +1 -0
- package/lib/types/host/git-service.d.ts +130 -0
- package/lib/types/host/git-service.d.ts.map +1 -0
- package/lib/types/host/loopback.d.ts +25 -0
- package/lib/types/host/loopback.d.ts.map +1 -0
- package/lib/types/host/poll-guard.d.ts +55 -0
- package/lib/types/host/poll-guard.d.ts.map +1 -0
- package/lib/types/host/routes.d.ts +54 -0
- package/lib/types/host/routes.d.ts.map +1 -0
- package/lib/types/index.d.ts +35 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/mount-once.d.ts +25 -0
- package/lib/types/mount-once.d.ts.map +1 -0
- package/package.json +85 -0
- package/src/client/FileManagerSettingsCard.tsx +117 -0
- package/src/client/PluginSettingsCard.tsx +337 -0
- package/src/client/api.ts +141 -0
- package/src/client/chat/file-ref.ts +144 -0
- package/src/client/chat/mermaid-chat.tsx +102 -0
- package/src/client/chat/placeholder-hint.tsx +46 -0
- package/src/client/components/ExplorerPanel.tsx +534 -0
- package/src/client/components/FileIcon.tsx +46 -0
- package/src/client/components/ScmPanel.tsx +480 -0
- package/src/client/components/a11y.ts +20 -0
- package/src/client/components/icons.tsx +274 -0
- package/src/client/components/overlay.tsx +225 -0
- package/src/client/css-modules.d.ts +5 -0
- package/src/client/drag/DragFileInlay.tsx +89 -0
- package/src/client/drag/file-drag.ts +67 -0
- package/src/client/drag.ts +154 -0
- package/src/client/file-source.ts +58 -0
- package/src/client/fileType.ts +129 -0
- package/src/client/floating.ts +63 -0
- package/src/client/hooks/useResizableSplit.ts +91 -0
- package/src/client/hooks/useStore.ts +15 -0
- package/src/client/index.ts +389 -0
- package/src/client/layout.ts +546 -0
- package/src/client/locales.ts +247 -0
- package/src/client/maximize.ts +34 -0
- package/src/client/mount.tsx +74 -0
- package/src/client/persist.ts +194 -0
- package/src/client/picker/FilePickerModal.tsx +506 -0
- package/src/client/picker/file-picker.ts +86 -0
- package/src/client/preview/PreviewPanel.tsx +233 -0
- package/src/client/preview/PreviewTabs.tsx +159 -0
- package/src/client/preview/PreviewToolbar.tsx +160 -0
- package/src/client/preview/content.tsx +617 -0
- package/src/client/preview/markdown.ts +351 -0
- package/src/client/preview/mermaid.ts +274 -0
- package/src/client/preview/selection.ts +82 -0
- package/src/client/reference.ts +161 -0
- package/src/client/settings-card.module.css +316 -0
- package/src/client/settings-form.ts +451 -0
- package/src/client/store.ts +1290 -0
- package/src/client/styles/chip.module.css +38 -0
- package/src/client/styles/drag.module.css +30 -0
- package/src/client/styles/explorer.module.css +371 -0
- package/src/client/styles/picker.module.css +344 -0
- package/src/client/styles/preview.module.css +904 -0
- package/src/client/styles/scm.module.css +380 -0
- package/src/client/styles/tokens.module.css +480 -0
- package/src/core/types.ts +162 -0
- package/src/host/fs-service.ts +513 -0
- package/src/host/gate.ts +74 -0
- package/src/host/git-runner.ts +116 -0
- package/src/host/git-service.ts +395 -0
- package/src/host/loopback.ts +63 -0
- package/src/host/poll-guard.ts +109 -0
- package/src/host/routes.ts +695 -0
- package/src/index.ts +97 -0
- package/src/mount-once.ts +48 -0
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Staged form model behind the plugin settings card. A card stages what the
|
|
3
|
+
* user types and writes it only when they save — the settings write is a
|
|
4
|
+
* durable, revision-fenced document mutation, so staging keeps what is on
|
|
5
|
+
* screen exactly what a save would store. Family-shared slice inlined into
|
|
6
|
+
* each plugin's client bundle; mirrors the official ui-plugin-config
|
|
7
|
+
* card-store pattern.
|
|
8
|
+
*/
|
|
9
|
+
import type { SettingsScope, SnapshotStore } from '@deepseek-ai/dsh-client-runtime/client';
|
|
10
|
+
/** The write one field's staged text performs when the card is saved. */
|
|
11
|
+
export type FieldWrite = {
|
|
12
|
+
kind: 'set';
|
|
13
|
+
value: unknown;
|
|
14
|
+
} | {
|
|
15
|
+
kind: 'clear';
|
|
16
|
+
};
|
|
17
|
+
/** How one field converts between its stored value and its draft text. */
|
|
18
|
+
export interface FieldSpec {
|
|
19
|
+
/** Field name inside the namespace section. */
|
|
20
|
+
field: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the Host treats this field as a secret and redacts its value from
|
|
23
|
+
* the read-back (role('secret') in the section schema). Redacted secrets are
|
|
24
|
+
* never compared against the draft on save; the field lands when the scope
|
|
25
|
+
* reports the write succeeded (its secret-set marker under the bridge), so
|
|
26
|
+
* a successful secret save is not misreported as failed.
|
|
27
|
+
*/
|
|
28
|
+
secret?: boolean;
|
|
29
|
+
/** Render a stored value as draft text; the empty string when the section carries none. */
|
|
30
|
+
format: (value: unknown) => string;
|
|
31
|
+
/**
|
|
32
|
+
* The write this draft text stages, or undefined when the text is not a
|
|
33
|
+
* value this field accepts — which blocks the save rather than discarding it.
|
|
34
|
+
*/
|
|
35
|
+
parse: (text: string) => FieldWrite | undefined;
|
|
36
|
+
}
|
|
37
|
+
/** One field as the card renders it. */
|
|
38
|
+
export interface FieldState {
|
|
39
|
+
/** Draft text the control renders. */
|
|
40
|
+
text: string;
|
|
41
|
+
/** Whether saving would leave a user-layer entry for this field. */
|
|
42
|
+
overridden: boolean;
|
|
43
|
+
/** Whether the draft is not a value this field accepts, which blocks saving. */
|
|
44
|
+
invalid: boolean;
|
|
45
|
+
}
|
|
46
|
+
/** Form state every plugin settings card shares. */
|
|
47
|
+
export interface CardShell {
|
|
48
|
+
/** False while the namespace is still loading; the card renders nothing. */
|
|
49
|
+
available: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the namespace is actually served to this client. False when the
|
|
52
|
+
* Host deployment does not expose it (e.g. the official apiproxy settings
|
|
53
|
+
* allowlist omits third-party namespaces): the card renders an explanation
|
|
54
|
+
* instead of its form, so a missing namespace never looks like a missing
|
|
55
|
+
* plugin.
|
|
56
|
+
*/
|
|
57
|
+
exposed: boolean;
|
|
58
|
+
/** Whether the Host document accepts writes. */
|
|
59
|
+
writable: boolean;
|
|
60
|
+
/** Whether the form holds edits that a save would write. */
|
|
61
|
+
dirty: boolean;
|
|
62
|
+
/** Whether any staged draft is invalid, which blocks the save. */
|
|
63
|
+
invalid: boolean;
|
|
64
|
+
/** Whether a save is crossing the wire. */
|
|
65
|
+
saving: boolean;
|
|
66
|
+
/** Whether the last save did not land as staged; cleared by the next edit or save. */
|
|
67
|
+
failed: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* The rejection code/message the Host returned for the last failed save,
|
|
70
|
+
* surfaced next to the generic failure text. Undefined while no save has
|
|
71
|
+
* failed (or the failure carried no server reason).
|
|
72
|
+
*/
|
|
73
|
+
failedReason?: string;
|
|
74
|
+
}
|
|
75
|
+
/** The write actions the card's slot entry injects. */
|
|
76
|
+
export interface CardActions {
|
|
77
|
+
/** Stage draft text for one field. */
|
|
78
|
+
edit: (field: string, text: string) => void;
|
|
79
|
+
/** Stage a clear, so saving lets the field re-inherit the composition layer. */
|
|
80
|
+
resetField: (field: string) => void;
|
|
81
|
+
/** Write every staged edit, then re-seed from what the Host accepted. */
|
|
82
|
+
save: () => void;
|
|
83
|
+
/** Drop every staged edit. */
|
|
84
|
+
discard: () => void;
|
|
85
|
+
}
|
|
86
|
+
/** One durable write a batched settings scope performs. */
|
|
87
|
+
export interface BatchedWrite {
|
|
88
|
+
/** Field this entry writes. */
|
|
89
|
+
field: string;
|
|
90
|
+
/** set stores a value; unset drops the leaf. */
|
|
91
|
+
op: 'set' | 'unset';
|
|
92
|
+
/** Value for op set (absent for unset). */
|
|
93
|
+
value?: unknown;
|
|
94
|
+
}
|
|
95
|
+
/** Per-field outcome of one batched scope write. */
|
|
96
|
+
export interface BatchedFieldResult {
|
|
97
|
+
/** Field this entry writes. */
|
|
98
|
+
field: string;
|
|
99
|
+
/** Whether the Host accepted this field's write (per the read-back view). */
|
|
100
|
+
landed: boolean;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Result of a batched scope write. The bridge scope posts every planned write
|
|
104
|
+
* in one /mutate so the Host validate hook judges baseURL+model together; a
|
|
105
|
+
* batched refusal fails the whole save rather than per-field.
|
|
106
|
+
*/
|
|
107
|
+
export interface BatchResult {
|
|
108
|
+
/** Whether the whole mutate was accepted. */
|
|
109
|
+
ok: boolean;
|
|
110
|
+
/** Per-field success, in the request order (always present when ok). */
|
|
111
|
+
fields: BatchedFieldResult[];
|
|
112
|
+
/** Host rejection code (mutate refused). */
|
|
113
|
+
code?: string;
|
|
114
|
+
/** Host rejection message (mutate refused). */
|
|
115
|
+
message?: string;
|
|
116
|
+
}
|
|
117
|
+
/** Constraints a numeric field's accepted drafts must satisfy, mirroring the host schema. */
|
|
118
|
+
export interface NumberConstraints {
|
|
119
|
+
/** The accepted value must be a whole number. */
|
|
120
|
+
integer?: boolean;
|
|
121
|
+
/** The accepted value must be at least this. */
|
|
122
|
+
min?: number;
|
|
123
|
+
}
|
|
124
|
+
/** A whole- or decimal-number field. An empty draft clears the field; any other draft that is not a finite number within the constraints blocks the save. */
|
|
125
|
+
export declare function numberField(field: string, constraints?: NumberConstraints): FieldSpec;
|
|
126
|
+
/** A free-text field. An empty draft clears the field. */
|
|
127
|
+
export declare function textField(field: string): FieldSpec;
|
|
128
|
+
/**
|
|
129
|
+
* A free-text field the Host treats as a secret and redacts from the read-back
|
|
130
|
+
* (role('secret') in the section schema). The card still edits it like text,
|
|
131
|
+
* but a save never compares the redacted value back and relies on the scope
|
|
132
|
+
* reporting the write landed.
|
|
133
|
+
*/
|
|
134
|
+
export declare function secretField(field: string): FieldSpec;
|
|
135
|
+
/** A boolean field, edited through true/false draft text. */
|
|
136
|
+
export declare function booleanField(field: string): FieldSpec;
|
|
137
|
+
/** An enumerated string field; only the listed choices are accepted. An empty draft clears the field. */
|
|
138
|
+
export declare function choiceField(field: string, choices: readonly string[]): FieldSpec;
|
|
139
|
+
/**
|
|
140
|
+
* Stages one card's edits over one settings namespace and writes them on save.
|
|
141
|
+
*
|
|
142
|
+
* The Host is the only authority on whether a value was accepted — its
|
|
143
|
+
* validators own the constraints no schema can express — so the outcome is
|
|
144
|
+
* read back from the section rather than predicted here. A save that did not
|
|
145
|
+
* land keeps its drafts, so the user can correct them instead of retyping.
|
|
146
|
+
*/
|
|
147
|
+
export declare class CardForm<T> {
|
|
148
|
+
private readonly scope;
|
|
149
|
+
private readonly specs;
|
|
150
|
+
private readonly staged;
|
|
151
|
+
private readonly listeners;
|
|
152
|
+
/** The scope subscription installed in the constructor; released by dispose(). */
|
|
153
|
+
private readonly disposeScope;
|
|
154
|
+
private disposed;
|
|
155
|
+
private saving;
|
|
156
|
+
private failed;
|
|
157
|
+
private failedReason;
|
|
158
|
+
/** @param scope - the bound settings scope for this card's namespace. */
|
|
159
|
+
constructor(scope: SettingsScope<T>, specs: FieldSpec[]);
|
|
160
|
+
/**
|
|
161
|
+
* Release the scope subscription and every bound store listener. The card
|
|
162
|
+
* must call this on teardown; later calls are no-ops.
|
|
163
|
+
*/
|
|
164
|
+
dispose(): void;
|
|
165
|
+
/** Publish a projection of this form, rebuilt whenever the scope or a draft changes. */
|
|
166
|
+
bind<S>(project: () => S): SnapshotStore<S>;
|
|
167
|
+
/** Read the card-level state: what the Host serves, and what a save would do. */
|
|
168
|
+
shell(): CardShell;
|
|
169
|
+
/** Read one field's state from the effective section and its staged draft. */
|
|
170
|
+
field(field: string): FieldState;
|
|
171
|
+
/** The actions the card's slot registration injects. */
|
|
172
|
+
actions(): CardActions;
|
|
173
|
+
/**
|
|
174
|
+
* Write every staged edit, then re-seed from what the Host accepted.
|
|
175
|
+
*
|
|
176
|
+
* When the scope carries the optional batch surface (the dsh-web-ui
|
|
177
|
+
* bridge scope), every planned write rides one mutation so cross-field
|
|
178
|
+
* validate hooks (baseURL+model) judge the batch as a unit instead of
|
|
179
|
+
* deadlocking on per-field writes. Otherwise the per-field loop runs.
|
|
180
|
+
* A field lands only when the Host reports it held the staged value; a
|
|
181
|
+
* landed field's draft is dropped, a failed one stays staged for the user.
|
|
182
|
+
* @returns settlement after every write and the read-back.
|
|
183
|
+
*/
|
|
184
|
+
save(): Promise<void>;
|
|
185
|
+
/** The scope's batch surface when it supports one; undefined conservatively otherwise. */
|
|
186
|
+
private batchedScope;
|
|
187
|
+
/**
|
|
188
|
+
* Every staged edit a save would write. An entry whose draft is not a value
|
|
189
|
+
* its field accepts carries no write: the form is still dirty, and the save
|
|
190
|
+
* refuses rather than dropping the edit. A staged edit that matches the
|
|
191
|
+
* effective section is not a write at all.
|
|
192
|
+
* @returns the planned writes, in the order the fields were staged.
|
|
193
|
+
*/
|
|
194
|
+
private plan;
|
|
195
|
+
private clear;
|
|
196
|
+
private store;
|
|
197
|
+
private stage;
|
|
198
|
+
private specOf;
|
|
199
|
+
private snapshotOf;
|
|
200
|
+
private sectionValue;
|
|
201
|
+
private baseValue;
|
|
202
|
+
private userLayer;
|
|
203
|
+
private stored;
|
|
204
|
+
private publish;
|
|
205
|
+
}
|
|
206
|
+
//# sourceMappingURL=settings-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-form.d.ts","sourceRoot":"","sources":["../../../src/client/settings-form.ts"],"names":[],"mappings":"AACA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAyB,aAAa,EAAE,MAAM,wCAAwC,CAAA;AAGjH,yEAAyE;AACzE,MAAM,MAAM,UAAU,GAClB;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,CAAA;AAErB,0EAA0E;AAC1E,MAAM,WAAW,SAAS;IACxB,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAA;IACb;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,2FAA2F;IAC3F,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,CAAA;IAClC;;;OAGG;IACH,KAAK,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,UAAU,GAAG,SAAS,CAAA;CAChD;AAED,wCAAwC;AACxC,MAAM,WAAW,UAAU;IACzB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,oEAAoE;IACpE,UAAU,EAAE,OAAO,CAAA;IACnB,gFAAgF;IAChF,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,oDAAoD;AACpD,MAAM,WAAW,SAAS;IACxB,4EAA4E;IAC5E,SAAS,EAAE,OAAO,CAAA;IAClB;;;;;;OAMG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAA;IACjB,4DAA4D;IAC5D,KAAK,EAAE,OAAO,CAAA;IACd,kEAAkE;IAClE,OAAO,EAAE,OAAO,CAAA;IAChB,2CAA2C;IAC3C,MAAM,EAAE,OAAO,CAAA;IACf,sFAAsF;IACtF,MA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pB;;;;;;OAMG;IACH,OAAO,CAAC,IAAI;YAiBE,KAAK;YAKL,KAAK;IAUnB,OAAO,CAAC,KAAK;IAOb,OAAO,CAAC,MAAM;IAQd,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,YAAY;IAIpB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,MAAM;IAKd,OAAO,CAAC,OAAO;CAGhB"}
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-free state core of the panel system: four small stores (layout,
|
|
3
|
+
* explorer, scm, preview) built on a minimal subscribe/getSnapshot primitive
|
|
4
|
+
* so every decision lives outside React (StrictMode-safe: update reducers are
|
|
5
|
+
* pure; async work — fetches, persistence — runs in the action layer).
|
|
6
|
+
*
|
|
7
|
+
* FileManager's right-panel architecture (Apache-2.0, re-implemented): the width
|
|
8
|
+
* clamps below are the exact ordered pair that keeps the chat area >= 360px
|
|
9
|
+
* at all times (see the research report's section 4.2).
|
|
10
|
+
* @module dsh-filemgr/client/store
|
|
11
|
+
*/
|
|
12
|
+
import type { FsEntry, GitStatusView, PreviewContentType, SearchHit } from '../core/types.ts';
|
|
13
|
+
import type { PanelApi } from './api.ts';
|
|
14
|
+
/** A minimal external store usable with useSyncExternalStore. */
|
|
15
|
+
export interface StateHandle<S> {
|
|
16
|
+
getSnapshot: () => S;
|
|
17
|
+
subscribe: (listener: () => void) => () => void;
|
|
18
|
+
/** Pure update: fn receives the previous state and returns the next. */
|
|
19
|
+
update: (fn: (prev: S) => S) => void;
|
|
20
|
+
}
|
|
21
|
+
/** Create a state handle with an immutable snapshot (new object per update). */
|
|
22
|
+
export declare function createState<S>(initial: S): StateHandle<S>;
|
|
23
|
+
/** Chat-area floor the two clamps guarantee (never below this). */
|
|
24
|
+
export declare const MIN_CHAT_PANEL_PX = 360;
|
|
25
|
+
/** Preview region width contract. */
|
|
26
|
+
export declare const MIN_PREVIEW_PANEL_PX = 340;
|
|
27
|
+
export declare const DEFAULT_PREVIEW_REGION_PX = 480;
|
|
28
|
+
export declare const MAX_PREVIEW_REGION_PX = 1200;
|
|
29
|
+
/** Explorer (workspace) width contract. */
|
|
30
|
+
export declare const MIN_WORKSPACE_PANEL_PX = 220;
|
|
31
|
+
export declare const MAX_WORKSPACE_PANEL_PX = 500;
|
|
32
|
+
export declare const DEFAULT_WORKSPACE_PANEL_PX = 260;
|
|
33
|
+
/** Preview region horizontal chrome (margins + borders) the clamps subtract. */
|
|
34
|
+
export declare const PREVIEW_REGION_CHROME_PX = 24;
|
|
35
|
+
/** Storage keys (FileManager contract, verbatim). */
|
|
36
|
+
export declare const KEY_EXPLORER_WIDTH = "chat-workspace-width-px";
|
|
37
|
+
export declare const KEY_PREVIEW_WIDTH = "chat-preview-width-px";
|
|
38
|
+
export declare const KEY_COLLAPSE = "project-panel-collapse:";
|
|
39
|
+
export declare const KEY_EXPLORER_UI = "explorer-ui:";
|
|
40
|
+
/** Trailing window for coalescing explorer fs-event refetches (ms). */
|
|
41
|
+
export declare const FS_COALESCE_MS = 200;
|
|
42
|
+
export declare const KEY_SCM_UI = "scm-ui:";
|
|
43
|
+
/**
|
|
44
|
+
* Explorer clamp (runs first): reserve chat's floor plus the preview region
|
|
45
|
+
* (min + chrome) when open, so the explorer never grows into the preview's
|
|
46
|
+
* space; floor at the explorer minimum so a narrow container cannot squeeze
|
|
47
|
+
* it to nothing.
|
|
48
|
+
*/
|
|
49
|
+
export declare function clampExplorerWidth(requested: number, available: number, previewOpen: boolean): number;
|
|
50
|
+
/**
|
|
51
|
+
* Preview clamp (runs after the explorer clamp): reserve chat's floor plus
|
|
52
|
+
* the already-clamped explorer width plus the region chrome. The ordered pair
|
|
53
|
+
* guarantees chat = available - explorer - preview >= 360.
|
|
54
|
+
*/
|
|
55
|
+
export declare function clampPreviewWidth(requested: number, available: number, explorerWidth: number): number;
|
|
56
|
+
/** Which panel is maximized (null = normal layout). */
|
|
57
|
+
export type MaximizeTarget = 'explorer' | 'preview';
|
|
58
|
+
/** Layout panel state (project-scoped). */
|
|
59
|
+
export interface LayoutState {
|
|
60
|
+
/** The project root ('' when no project is bound). */
|
|
61
|
+
root: string;
|
|
62
|
+
/** Requested explorer width (persisted; clamped on render). */
|
|
63
|
+
explorerWidth: number;
|
|
64
|
+
/** Requested preview width (persisted; clamped on render). */
|
|
65
|
+
previewWidth: number;
|
|
66
|
+
/** Explorer collapsed (width 0, kept mounted). */
|
|
67
|
+
explorerCollapsed: boolean;
|
|
68
|
+
/** Preview region visible. */
|
|
69
|
+
previewOpen: boolean;
|
|
70
|
+
/** Measured available width of the [content | panels] row. */
|
|
71
|
+
availableWidth: number;
|
|
72
|
+
/** True while a panel drag is in flight (disables transitions). */
|
|
73
|
+
dragging: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Maximized panel (transient, never persisted): the panel takes over the
|
|
76
|
+
* whole frame row (or the viewport as an overlay on narrow screens) while
|
|
77
|
+
* the other panel, the chat area and the shell side columns hide. Restoring
|
|
78
|
+
* re-applies the stored widths/collapse — nothing else changes.
|
|
79
|
+
*/
|
|
80
|
+
maximized: MaximizeTarget | null;
|
|
81
|
+
}
|
|
82
|
+
/** The layout store plus its pure width math. */
|
|
83
|
+
export interface LayoutStore extends StateHandle<LayoutState> {
|
|
84
|
+
/** Effective explorer width after the ordered clamp. */
|
|
85
|
+
explorerWidthPx: (state: LayoutState) => number;
|
|
86
|
+
/** Effective preview width after the ordered clamp. */
|
|
87
|
+
previewWidthPx: (state: LayoutState) => number;
|
|
88
|
+
/** Persist a clamped shrink when the stored width no longer fits. */
|
|
89
|
+
shrinkToFit: (state: LayoutState) => void;
|
|
90
|
+
}
|
|
91
|
+
/** Storage key of the collapse preference for one root. */
|
|
92
|
+
export declare const collapseKey: (root: string) => string;
|
|
93
|
+
/** Create the layout store (reads persisted widths on init). */
|
|
94
|
+
export declare function createLayoutStore(): LayoutStore;
|
|
95
|
+
/** Switch the layout to a project root (restores collapse + widths). */
|
|
96
|
+
export declare function layoutSetRoot(store: LayoutStore, root: string, previewOpen: boolean): void;
|
|
97
|
+
/** Explorer panel state. */
|
|
98
|
+
export interface ExplorerState {
|
|
99
|
+
root: string;
|
|
100
|
+
/** rel path -> listing cache ('' = root). */
|
|
101
|
+
dirs: Record<string, FsEntry[]>;
|
|
102
|
+
/** Expanded dir rel paths (order = display order). */
|
|
103
|
+
expanded: string[];
|
|
104
|
+
/** Selected node rel path (null = none). */
|
|
105
|
+
selected: string | null;
|
|
106
|
+
/** Dirs currently fetching. */
|
|
107
|
+
loading: string[];
|
|
108
|
+
/** Active tab: files | changes. */
|
|
109
|
+
activeTab: 'files' | 'changes';
|
|
110
|
+
/** Filename search state. */
|
|
111
|
+
search: {
|
|
112
|
+
query: string;
|
|
113
|
+
status: 'idle' | 'searching' | 'done' | 'error';
|
|
114
|
+
hits: SearchHit[];
|
|
115
|
+
truncated: boolean;
|
|
116
|
+
};
|
|
117
|
+
/** Bumped on every fs change event (drives refetch + re-render). */
|
|
118
|
+
version: number;
|
|
119
|
+
}
|
|
120
|
+
/** The explorer store with its async actions. */
|
|
121
|
+
export interface ExplorerStore extends StateHandle<ExplorerState> {
|
|
122
|
+
setRoot: (root: string) => void;
|
|
123
|
+
setActiveTab: (tab: 'files' | 'changes') => void;
|
|
124
|
+
toggleDir: (rel: string) => void;
|
|
125
|
+
select: (rel: string | null) => void;
|
|
126
|
+
reveal: (rel: string) => void;
|
|
127
|
+
setSearchQuery: (query: string) => void;
|
|
128
|
+
cancelSearch: () => void;
|
|
129
|
+
/** Refetch every expanded dir + active search after a host change event. */
|
|
130
|
+
handleFsChange: () => void;
|
|
131
|
+
/** Reveal a path in the OS file manager (right-click menu). */
|
|
132
|
+
revealInFileManager: (rel: string) => Promise<boolean>;
|
|
133
|
+
/** Open a path with the OS default app (files only, right-click menu). */
|
|
134
|
+
openWithDefaultApp: (rel: string) => Promise<boolean>;
|
|
135
|
+
/** Rename a path (newName is a bare name). */
|
|
136
|
+
renameEntry: (rel: string, newName: string) => Promise<boolean>;
|
|
137
|
+
/** Create a directory at rel (parent dirs untouched). */
|
|
138
|
+
createDir: (rel: string) => Promise<boolean>;
|
|
139
|
+
/** Create an empty file at rel. */
|
|
140
|
+
createFile: (rel: string) => Promise<boolean>;
|
|
141
|
+
/** Delete a path (recursive for directories). */
|
|
142
|
+
deleteEntry: (rel: string) => Promise<boolean>;
|
|
143
|
+
}
|
|
144
|
+
/** Read the persisted explorer UI state for a root (range-guarded). */
|
|
145
|
+
export declare function readExplorerUi(root: string): {
|
|
146
|
+
expanded: string[];
|
|
147
|
+
selected: string | null;
|
|
148
|
+
};
|
|
149
|
+
/** Create the explorer store (per-root persistence, debounced writes). */
|
|
150
|
+
export declare function createExplorerStore(api: PanelApi): ExplorerStore;
|
|
151
|
+
/** SCM panel state. */
|
|
152
|
+
export interface ScmState {
|
|
153
|
+
root: string;
|
|
154
|
+
/** null: not a git repository (or still loading). */
|
|
155
|
+
status: GitStatusView | null;
|
|
156
|
+
/** True when the host reported git is not installed (SSE gitUnavailable). */
|
|
157
|
+
gitMissing: boolean;
|
|
158
|
+
loading: boolean;
|
|
159
|
+
/** Paths with an action in flight. */
|
|
160
|
+
busy: string[];
|
|
161
|
+
/** Paths the last action reported failed. */
|
|
162
|
+
failed: string[];
|
|
163
|
+
/** list | tree. */
|
|
164
|
+
viewMode: 'list' | 'tree';
|
|
165
|
+
/** Section collapse map (repositories | changes). */
|
|
166
|
+
sectionCollapsed: Record<string, boolean>;
|
|
167
|
+
/** Tree-view expanded dir keys. */
|
|
168
|
+
treeExpanded: string[];
|
|
169
|
+
/** Path of the last row opened in the preview panel (null = none). */
|
|
170
|
+
selected: string | null;
|
|
171
|
+
}
|
|
172
|
+
/** The scm store with its async actions. */
|
|
173
|
+
export interface ScmStore extends StateHandle<ScmState> {
|
|
174
|
+
setRoot: (root: string) => void;
|
|
175
|
+
refresh: () => Promise<void>;
|
|
176
|
+
stage: (paths: string[]) => Promise<void>;
|
|
177
|
+
unstage: (paths: string[]) => Promise<void>;
|
|
178
|
+
discard: (paths: string[]) => Promise<void>;
|
|
179
|
+
discardAll: () => Promise<void>;
|
|
180
|
+
setViewMode: (mode: 'list' | 'tree') => void;
|
|
181
|
+
setSectionCollapsed: (id: string, collapsed: boolean) => void;
|
|
182
|
+
setTreeExpanded: (keys: string[]) => void;
|
|
183
|
+
setFailed: (paths: string[]) => void;
|
|
184
|
+
select: (path: string | null) => void;
|
|
185
|
+
}
|
|
186
|
+
/** Read the persisted scm UI state for a root (guarded). */
|
|
187
|
+
export declare function readScmUi(root: string): {
|
|
188
|
+
viewMode: 'list' | 'tree';
|
|
189
|
+
sectionCollapsed: Record<string, boolean>;
|
|
190
|
+
treeExpanded: string[];
|
|
191
|
+
selected: string | null;
|
|
192
|
+
};
|
|
193
|
+
/** Create the scm store (host status is the only truth — no optimistic rows). */
|
|
194
|
+
export declare function createScmStore(api: PanelApi): ScmStore;
|
|
195
|
+
/** One preview tab. */
|
|
196
|
+
export interface PreviewTabState {
|
|
197
|
+
id: string;
|
|
198
|
+
title: string;
|
|
199
|
+
root: string;
|
|
200
|
+
path: string;
|
|
201
|
+
contentType: PreviewContentType;
|
|
202
|
+
/** Diff tabs (opened from the SCM panel): content is the path's git diff. */
|
|
203
|
+
diff?: {
|
|
204
|
+
staged: boolean;
|
|
205
|
+
};
|
|
206
|
+
/** URL tabs: bumped by reloadTab to re-navigate the preview frame. */
|
|
207
|
+
reloadNonce?: number;
|
|
208
|
+
/** null: content not loaded yet. */
|
|
209
|
+
content: string | null;
|
|
210
|
+
/** Image dimensions for image tabs. */
|
|
211
|
+
image?: {
|
|
212
|
+
width: number;
|
|
213
|
+
height: number;
|
|
214
|
+
};
|
|
215
|
+
dirty: boolean;
|
|
216
|
+
/** mtime the loaded/saved content is based on (write-conflict base). */
|
|
217
|
+
mtime?: number;
|
|
218
|
+
/** Disk is newer than the loaded content (refresh affordance). */
|
|
219
|
+
updated: boolean;
|
|
220
|
+
loading: boolean;
|
|
221
|
+
truncated: boolean;
|
|
222
|
+
error: string | null;
|
|
223
|
+
savedAt: number;
|
|
224
|
+
}
|
|
225
|
+
/** Preview panel state. */
|
|
226
|
+
export interface PreviewState {
|
|
227
|
+
root: string;
|
|
228
|
+
open: boolean;
|
|
229
|
+
tabs: PreviewTabState[];
|
|
230
|
+
activeTabId: string | null;
|
|
231
|
+
/** Bumped on every fs change event (drives staleness checks). */
|
|
232
|
+
version: number;
|
|
233
|
+
}
|
|
234
|
+
/** The preview store with its async actions. */
|
|
235
|
+
export interface PreviewStore extends StateHandle<PreviewState> {
|
|
236
|
+
setRoot: (root: string) => void;
|
|
237
|
+
openFile: (root: string, path: string) => void;
|
|
238
|
+
openDiff: (root: string, path: string, staged: boolean) => void;
|
|
239
|
+
switchTab: (id: string) => void;
|
|
240
|
+
closeTabs: (ids: string[]) => void;
|
|
241
|
+
updateContent: (id: string, content: string) => void;
|
|
242
|
+
saveTab: (id: string) => Promise<void>;
|
|
243
|
+
reloadTab: (id: string) => Promise<void>;
|
|
244
|
+
setOpen: (open: boolean) => void;
|
|
245
|
+
handleFsChange: () => void;
|
|
246
|
+
handleGitChange: (root: string) => void;
|
|
247
|
+
}
|
|
248
|
+
/** Persisted tab meta (content is re-fetched on restore). */
|
|
249
|
+
interface PersistedTab {
|
|
250
|
+
id: string;
|
|
251
|
+
title: string;
|
|
252
|
+
root: string;
|
|
253
|
+
path: string;
|
|
254
|
+
contentType: PreviewContentType;
|
|
255
|
+
diff?: {
|
|
256
|
+
staged: boolean;
|
|
257
|
+
};
|
|
258
|
+
savedAt: number;
|
|
259
|
+
}
|
|
260
|
+
/** Read persisted tabs for a root (guarded, content-less). */
|
|
261
|
+
export declare function readPreviewTabs(root: string): PersistedTab[];
|
|
262
|
+
/** Create the preview store (per-root tab persistence with LRU scopes). */
|
|
263
|
+
export declare function createPreviewStore(api: PanelApi): PreviewStore;
|
|
264
|
+
/** Convenience bundle: the four stores wired to one api. */
|
|
265
|
+
export interface PanelStores {
|
|
266
|
+
layout: LayoutStore;
|
|
267
|
+
explorer: ExplorerStore;
|
|
268
|
+
scm: ScmStore;
|
|
269
|
+
preview: PreviewStore;
|
|
270
|
+
}
|
|
271
|
+
/** PanelStores plus a pagehide flush hook. */
|
|
272
|
+
export interface PanelStoresWithFlush extends PanelStores {
|
|
273
|
+
/** Flush every pending debounced persist immediately (pagehide/beforeunload). */
|
|
274
|
+
flushNow: () => void;
|
|
275
|
+
}
|
|
276
|
+
/** Create the full store bundle. */
|
|
277
|
+
export declare function createPanelStores(api: PanelApi): PanelStoresWithFlush;
|
|
278
|
+
export {};
|
|
279
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/client/store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAY,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACvG,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAA;AAWxC,iEAAiE;AACjE,MAAM,WAAW,WAAW,CAAC,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC,CAAA;IACpB,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;IAC/C,wEAAwE;IACxE,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,CAAA;CACrC;AAED,gFAAgF;AAChF,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAgBzD;AAID,mEAAmE;AACnE,eAAO,MAAM,iBAAiB,MAAM,CAAA;AACpC,qCAAqC;AACrC,eAAO,MAAM,oBAAoB,MAAM,CAAA;AACvC,eAAO,MAAM,yBAAyB,MAAM,CAAA;AAC5C,eAAO,MAAM,qBAAqB,OAAO,C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DAA6D;AAC7D,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,kBAAkB,CAAA;IAC/B,IAAI,CAAC,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,CAAA;IAC1B,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,8DAA8D;AAC9D,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,EAAE,CAwB5D;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,QAAQ,GAAG,YAAY,CAoZ9D;AAED,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,WAAW,CAAA;IACnB,QAAQ,EAAE,aAAa,CAAA;IACvB,GAAG,EAAE,QAAQ,CAAA;IACb,OAAO,EAAE,YAAY,CAAA;CACtB;AAED,8CAA8C;AAC9C,MAAM,WAAW,oBAAqB,SAAQ,WAAW;IACvD,iFAAiF;IACjF,QAAQ,EAAE,MAAM,IAAI,CAAA;CACrB;AAED,oCAAoC;AACpC,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,QAAQ,GAAG,oBAAoB,CAarE"}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wire vocabulary shared by the host data services and the browser client:
|
|
3
|
+
* the request/response shapes of the /filemgr/* routes and the stable
|
|
4
|
+
* error codes the client maps onto copy. Pure types — no runtime code.
|
|
5
|
+
*
|
|
6
|
+
* The design follows FileManager's right-panel system (Apache-2.0, re-implemented
|
|
7
|
+
* from measured behavior, not copied code): the explorer column is a lazy
|
|
8
|
+
* directory tree, the preview column opens files as tabs, and the SCM tab
|
|
9
|
+
* reads the repository's real working-tree state.
|
|
10
|
+
* @module dsh-filemgr/core/types
|
|
11
|
+
*/
|
|
12
|
+
/** Envelope every /filemgr JSON response carries. */
|
|
13
|
+
export type PanelEnvelope<T> = {
|
|
14
|
+
ok: true;
|
|
15
|
+
value: T;
|
|
16
|
+
} | {
|
|
17
|
+
ok: false;
|
|
18
|
+
error: PanelError;
|
|
19
|
+
};
|
|
20
|
+
/** Stable rejection codes (host-authored; the client prefers its own copy by code). */
|
|
21
|
+
export type PanelErrorCode = 'workspace-unknown' | 'path-outside-root' | 'not-found' | 'is-directory' | 'read-failed' | 'write-conflict' | 'write-failed' | 'search-failed' | 'git-unavailable' | 'git-failed' | 'internal';
|
|
22
|
+
/** One rejection with a human-readable host message. */
|
|
23
|
+
export interface PanelError {
|
|
24
|
+
code: PanelErrorCode;
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
/** One filesystem entry in a directory listing (path is relative to the root). */
|
|
28
|
+
export interface FsEntry {
|
|
29
|
+
/** Display name (basename). */
|
|
30
|
+
name: string;
|
|
31
|
+
/** Path relative to the project root, '/' separated; '' is the root itself. */
|
|
32
|
+
path: string;
|
|
33
|
+
isDir: boolean;
|
|
34
|
+
/** Size in bytes (0 for directories). */
|
|
35
|
+
size: number;
|
|
36
|
+
/** Last-modified epoch millis (0 for directories). */
|
|
37
|
+
mtime: number;
|
|
38
|
+
}
|
|
39
|
+
/** The listing of one directory. */
|
|
40
|
+
export interface DirListing {
|
|
41
|
+
/** Canonical root path the listing is relative to. */
|
|
42
|
+
root: string;
|
|
43
|
+
/** Sorted entries (directories first, then files, both case-insensitive alpha). */
|
|
44
|
+
entries: FsEntry[];
|
|
45
|
+
/** True when the entry count was capped at MAX_ENTRIES (a giant flat dir). */
|
|
46
|
+
truncated: boolean;
|
|
47
|
+
}
|
|
48
|
+
/** The result of reading one file for preview. */
|
|
49
|
+
export interface FileRead {
|
|
50
|
+
/** Text content (decoded utf-8), or a data URL for image kinds. */
|
|
51
|
+
content: string;
|
|
52
|
+
/** True when the text was truncated at the preview ceiling. */
|
|
53
|
+
truncated: boolean;
|
|
54
|
+
/** Total size in bytes. */
|
|
55
|
+
size: number;
|
|
56
|
+
/** Last-modified epoch millis (the write-conflict base). */
|
|
57
|
+
mtime: number;
|
|
58
|
+
/** Image dimensions when the file is an image (host decodes via probe). */
|
|
59
|
+
image?: {
|
|
60
|
+
width: number;
|
|
61
|
+
height: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/** One filename-search hit. */
|
|
65
|
+
export interface SearchHit {
|
|
66
|
+
/** Path relative to the root. */
|
|
67
|
+
path: string;
|
|
68
|
+
/** Display name (basename). */
|
|
69
|
+
name: string;
|
|
70
|
+
isDir: boolean;
|
|
71
|
+
}
|
|
72
|
+
/** The filename-search result. */
|
|
73
|
+
export interface SearchView {
|
|
74
|
+
/** The query the hits were ranked for. */
|
|
75
|
+
query: string;
|
|
76
|
+
hits: SearchHit[];
|
|
77
|
+
/** True when the hit cap cut the result stream. */
|
|
78
|
+
truncated: boolean;
|
|
79
|
+
}
|
|
80
|
+
/** Working-tree state of one change row. */
|
|
81
|
+
export type GitFileState = 'created' | 'modified' | 'deleted' | 'renamed' | 'conflicted' | 'untracked' | 'unknown';
|
|
82
|
+
/** One change row in a git status. */
|
|
83
|
+
export interface GitChangeRow {
|
|
84
|
+
/** Path relative to the repo root. */
|
|
85
|
+
path: string;
|
|
86
|
+
/** Original path for renames (old -> new). */
|
|
87
|
+
oldPath?: string;
|
|
88
|
+
state: GitFileState;
|
|
89
|
+
/** True when the change sits in the index (staged). */
|
|
90
|
+
staged: boolean;
|
|
91
|
+
}
|
|
92
|
+
/** The git status view of one repo root. */
|
|
93
|
+
export interface GitStatusView {
|
|
94
|
+
/** Repo root (git rev-parse --show-toplevel). */
|
|
95
|
+
root: string;
|
|
96
|
+
/** Current branch name; '' when detached. */
|
|
97
|
+
branch: string;
|
|
98
|
+
/** Staged changes (index vs HEAD). */
|
|
99
|
+
staged: GitChangeRow[];
|
|
100
|
+
/** Unstaged changes (worktree vs index). */
|
|
101
|
+
unstaged: GitChangeRow[];
|
|
102
|
+
/** Untracked files (worktree, not in index). */
|
|
103
|
+
untracked: GitChangeRow[];
|
|
104
|
+
}
|
|
105
|
+
/** The result of a stage/unstage/discard batch. */
|
|
106
|
+
export interface GitBatchResult {
|
|
107
|
+
/** Rows the operation actually changed (post-op status snapshot for these paths). */
|
|
108
|
+
applied: string[];
|
|
109
|
+
/** Paths the host refused to touch. */
|
|
110
|
+
failed: string[];
|
|
111
|
+
}
|
|
112
|
+
/** One preview tab identity as persisted. */
|
|
113
|
+
export interface PreviewTabMeta {
|
|
114
|
+
/** Stable tab id (root + path + type). */
|
|
115
|
+
id: string;
|
|
116
|
+
/** Display title (basename). */
|
|
117
|
+
title: string;
|
|
118
|
+
/** Project root the file belongs to. */
|
|
119
|
+
root: string;
|
|
120
|
+
/** File path relative to the root. */
|
|
121
|
+
path: string;
|
|
122
|
+
contentType: PreviewContentType;
|
|
123
|
+
/** Whether the tab carries unsaved edits. */
|
|
124
|
+
dirty?: boolean;
|
|
125
|
+
/** Last write timestamp the tab's content was based on (conflict base). */
|
|
126
|
+
mtime?: number;
|
|
127
|
+
/** When the tab was last touched (LRU ordering within a scope). */
|
|
128
|
+
savedAt: number;
|
|
129
|
+
}
|
|
130
|
+
/** Preview content kinds the panel can render. */
|
|
131
|
+
export type PreviewContentType = 'markdown' | 'html' | 'code' | 'diff' | 'csv' | 'pdf' | 'word' | 'excel' | 'ppt' | 'image' | 'text' | 'url' | 'unsupported';
|
|
132
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,qDAAqD;AACrD,MAAM,MAAM,aAAa,CAAC,CAAC,IACvB;IAAE,EAAE,EAAE,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,CAAA;CAAE,GACtB;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CA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