@deepseek-ai/dsh-experimental-client-ui-forge 0.2.2-rc.4 → 0.2.3-alpha.1
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/README.i18n.yaml +12 -12
- package/README.md +47 -30
- package/README.zh.md +47 -30
- package/lib/client.js +18 -8
- package/lib/client.js.map +1 -1
- package/lib/index.js +2444 -406
- package/lib/typert.host.js +3433 -950
- package/lib/typert.remote-client.d.ts +89 -14
- package/lib/typert.remote-client.d.ts.map +1 -1
- package/lib/typert.remote-client.js +3155 -978
- package/lib/types/branch-name.d.ts +30 -0
- package/lib/types/branch-name.d.ts.map +1 -0
- package/lib/types/branch-name.js.map +1 -0
- package/lib/types/client/AttentionIndicator.d.ts +22 -0
- package/lib/types/client/AttentionIndicator.d.ts.map +1 -0
- package/lib/types/client/AttentionIndicator.js.map +1 -0
- package/lib/types/client/BaseMenu.d.ts.map +1 -1
- package/lib/types/client/BaseMenu.js.map +1 -1
- package/lib/types/client/ChangeRequestCard.d.ts +87 -9
- package/lib/types/client/ChangeRequestCard.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestCard.js.map +1 -1
- package/lib/types/client/ChangeRequestOverview.d.ts +126 -10
- package/lib/types/client/ChangeRequestOverview.d.ts.map +1 -1
- package/lib/types/client/ChangeRequestOverview.js.map +1 -1
- package/lib/types/client/ChangeRequestsSection.d.ts +76 -0
- package/lib/types/client/ChangeRequestsSection.d.ts.map +1 -0
- package/lib/types/client/ChangeRequestsSection.js.map +1 -0
- package/lib/types/client/ChangedFiles.d.ts +6 -2
- package/lib/types/client/ChangedFiles.d.ts.map +1 -1
- package/lib/types/client/ChangedFiles.js.map +1 -1
- package/lib/types/client/ChangesLoading.d.ts +14 -0
- package/lib/types/client/ChangesLoading.d.ts.map +1 -0
- package/lib/types/client/ChangesLoading.js.map +1 -0
- package/lib/types/client/ChangesTab.d.ts +62 -14
- package/lib/types/client/ChangesTab.d.ts.map +1 -1
- package/lib/types/client/ChangesTab.js.map +1 -1
- package/lib/types/client/ChangesTabTitle.js.map +1 -1
- package/lib/types/client/DiffFile.d.ts +23 -4
- package/lib/types/client/DiffFile.d.ts.map +1 -1
- package/lib/types/client/DiffFile.js.map +1 -1
- package/lib/types/client/EnvironmentRows.d.ts +79 -0
- package/lib/types/client/EnvironmentRows.d.ts.map +1 -0
- package/lib/types/client/EnvironmentRows.js.map +1 -0
- package/lib/types/client/FileTreePane.d.ts +5 -2
- package/lib/types/client/FileTreePane.d.ts.map +1 -1
- package/lib/types/client/FileTreePane.js.map +1 -1
- package/lib/types/client/LensFilter.d.ts +50 -0
- package/lib/types/client/LensFilter.d.ts.map +1 -0
- package/lib/types/client/LensFilter.js.map +1 -0
- package/lib/types/client/ReasonButton.d.ts +15 -0
- package/lib/types/client/ReasonButton.d.ts.map +1 -0
- package/lib/types/client/ReasonButton.js.map +1 -0
- package/lib/types/client/ReviewComposer.d.ts +11 -4
- package/lib/types/client/ReviewComposer.d.ts.map +1 -1
- package/lib/types/client/ReviewComposer.js.map +1 -1
- package/lib/types/client/ReviewControls.d.ts +18 -7
- package/lib/types/client/ReviewControls.d.ts.map +1 -1
- package/lib/types/client/ReviewControls.js.map +1 -1
- package/lib/types/client/ReviewThread.d.ts +3 -1
- package/lib/types/client/ReviewThread.d.ts.map +1 -1
- package/lib/types/client/ReviewThread.js.map +1 -1
- package/lib/types/client/ReviewThreads.d.ts +32 -2
- package/lib/types/client/ReviewThreads.d.ts.map +1 -1
- package/lib/types/client/ReviewThreads.js.map +1 -1
- package/lib/types/client/SessionHoverForge.d.ts.map +1 -1
- package/lib/types/client/SessionHoverForge.js.map +1 -1
- package/lib/types/client/SubmitReview.d.ts +4 -4
- package/lib/types/client/SubmitReview.d.ts.map +1 -1
- package/lib/types/client/SubmitReview.js.map +1 -1
- package/lib/types/client/ThreadList.js.map +1 -1
- package/lib/types/client/ViewOptionsMenu.d.ts +7 -1
- package/lib/types/client/ViewOptionsMenu.d.ts.map +1 -1
- package/lib/types/client/ViewOptionsMenu.js.map +1 -1
- package/lib/types/client/WorktreeNameDialog.d.ts +38 -0
- package/lib/types/client/WorktreeNameDialog.d.ts.map +1 -0
- package/lib/types/client/WorktreeNameDialog.js.map +1 -0
- package/lib/types/client/WorktreeProgress.d.ts +14 -3
- package/lib/types/client/WorktreeProgress.d.ts.map +1 -1
- package/lib/types/client/WorktreeProgress.js.map +1 -1
- package/lib/types/client/WorktreeToggle.d.ts +22 -15
- package/lib/types/client/WorktreeToggle.d.ts.map +1 -1
- package/lib/types/client/WorktreeToggle.js.map +1 -1
- package/lib/types/client/action-notices.d.ts +25 -0
- package/lib/types/client/action-notices.d.ts.map +1 -0
- package/lib/types/client/action-notices.js.map +1 -0
- package/lib/types/client/annotations.d.ts +41 -0
- package/lib/types/client/annotations.d.ts.map +1 -0
- package/lib/types/client/annotations.js.map +1 -0
- package/lib/types/client/branch-search.d.ts +38 -0
- package/lib/types/client/branch-search.d.ts.map +1 -0
- package/lib/types/client/branch-search.js.map +1 -0
- package/lib/types/client/change-requests-store.d.ts +25 -0
- package/lib/types/client/change-requests-store.d.ts.map +1 -0
- package/lib/types/client/change-requests-store.js.map +1 -0
- package/lib/types/client/changes-address.d.ts +3 -1
- package/lib/types/client/changes-address.d.ts.map +1 -1
- package/lib/types/client/changes-address.js.map +1 -1
- package/lib/types/client/changes-service.d.ts +119 -0
- package/lib/types/client/changes-service.d.ts.map +1 -0
- package/lib/types/client/changes-service.js.map +1 -0
- package/lib/types/client/changes-store.d.ts +6 -2
- package/lib/types/client/changes-store.d.ts.map +1 -1
- package/lib/types/client/changes-store.js.map +1 -1
- package/lib/types/client/checkout.d.ts.map +1 -1
- package/lib/types/client/checkout.js.map +1 -1
- package/lib/types/client/diff-rows.d.ts +49 -7
- package/lib/types/client/diff-rows.d.ts.map +1 -1
- package/lib/types/client/diff-rows.js.map +1 -1
- package/lib/types/client/file-tree.d.ts +7 -0
- package/lib/types/client/file-tree.d.ts.map +1 -1
- package/lib/types/client/file-tree.js.map +1 -1
- package/lib/types/client/forge-copy.d.ts +29 -0
- package/lib/types/client/forge-copy.d.ts.map +1 -0
- package/lib/types/client/forge-copy.js.map +1 -0
- package/lib/types/client/format.d.ts +8 -0
- package/lib/types/client/format.d.ts.map +1 -1
- package/lib/types/client/format.js.map +1 -1
- package/lib/types/client/glyphs.d.ts +3 -3
- package/lib/types/client/glyphs.d.ts.map +1 -1
- package/lib/types/client/glyphs.js.map +1 -1
- package/lib/types/client/highlight-context.d.ts +73 -0
- package/lib/types/client/highlight-context.d.ts.map +1 -0
- package/lib/types/client/highlight-context.js.map +1 -0
- package/lib/types/client/index.d.ts +9 -5
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/index.js.map +1 -1
- package/lib/types/client/lens-filter.d.ts +69 -0
- package/lib/types/client/lens-filter.d.ts.map +1 -0
- package/lib/types/client/lens-filter.js.map +1 -0
- package/lib/types/client/locales.d.ts +188 -36
- package/lib/types/client/locales.d.ts.map +1 -1
- package/lib/types/client/locales.js.map +1 -1
- package/lib/types/client/mount.d.ts +0 -4
- package/lib/types/client/mount.d.ts.map +1 -1
- package/lib/types/client/mount.js.map +1 -1
- package/lib/types/client/review-page/ReviewChat.d.ts +112 -0
- package/lib/types/client/review-page/ReviewChat.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewChat.js.map +1 -0
- package/lib/types/client/review-page/ReviewDetail.d.ts +56 -0
- package/lib/types/client/review-page/ReviewDetail.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewDetail.js.map +1 -0
- package/lib/types/client/review-page/ReviewLabels.d.ts +32 -0
- package/lib/types/client/review-page/ReviewLabels.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewLabels.js.map +1 -0
- package/lib/types/client/review-page/ReviewList.d.ts +68 -0
- package/lib/types/client/review-page/ReviewList.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewList.js.map +1 -0
- package/lib/types/client/review-page/ReviewNav.d.ts +28 -0
- package/lib/types/client/review-page/ReviewNav.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewNav.js.map +1 -0
- package/lib/types/client/review-page/ReviewPage.d.ts +61 -0
- package/lib/types/client/review-page/ReviewPage.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewPage.js.map +1 -0
- package/lib/types/client/review-page/ReviewStatus.d.ts +37 -0
- package/lib/types/client/review-page/ReviewStatus.d.ts.map +1 -0
- package/lib/types/client/review-page/ReviewStatus.js.map +1 -0
- package/lib/types/client/review-page/host-stream.d.ts +24 -0
- package/lib/types/client/review-page/host-stream.d.ts.map +1 -0
- package/lib/types/client/review-page/host-stream.js.map +1 -0
- package/lib/types/client/review-page/review-lists.d.ts +116 -0
- package/lib/types/client/review-page/review-lists.d.ts.map +1 -0
- package/lib/types/client/review-page/review-lists.js.map +1 -0
- package/lib/types/client/review-page/review-mount.d.ts +50 -0
- package/lib/types/client/review-page/review-mount.d.ts.map +1 -0
- package/lib/types/client/review-page/review-mount.js.map +1 -0
- package/lib/types/client/review-page/review-store.d.ts +79 -0
- package/lib/types/client/review-page/review-store.d.ts.map +1 -0
- package/lib/types/client/review-page/review-store.js.map +1 -0
- package/lib/types/client/review-queue.d.ts +19 -0
- package/lib/types/client/review-queue.d.ts.map +1 -1
- package/lib/types/client/review-queue.js.map +1 -1
- package/lib/types/client/review-threads.d.ts +0 -8
- package/lib/types/client/review-threads.d.ts.map +1 -1
- package/lib/types/client/review-threads.js.map +1 -1
- package/lib/types/client/review.d.ts +18 -0
- package/lib/types/client/review.d.ts.map +1 -1
- package/lib/types/client/review.js.map +1 -1
- package/lib/types/client/slots.d.ts +114 -0
- package/lib/types/client/slots.d.ts.map +1 -0
- package/lib/types/client/slots.js.map +1 -0
- package/lib/types/client/source.d.ts +29 -23
- package/lib/types/client/source.d.ts.map +1 -1
- package/lib/types/client/source.js.map +1 -1
- package/lib/types/client/status.d.ts +13 -2
- package/lib/types/client/status.d.ts.map +1 -1
- package/lib/types/client/status.js.map +1 -1
- package/lib/types/git.d.ts +4 -15
- package/lib/types/git.d.ts.map +1 -1
- package/lib/types/git.js.map +1 -1
- package/lib/types/index.d.ts +346 -28
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/index.js.map +1 -1
- package/lib/types/lens-version.d.ts +14 -0
- package/lib/types/lens-version.d.ts.map +1 -0
- package/lib/types/lens-version.js.map +1 -0
- package/lib/types/lenses.d.ts +122 -0
- package/lib/types/lenses.d.ts.map +1 -0
- package/lib/types/lenses.js.map +1 -0
- package/lib/types/local-diff.d.ts +16 -0
- package/lib/types/local-diff.d.ts.map +1 -1
- package/lib/types/local-diff.js.map +1 -1
- package/lib/types/panel.d.ts +59 -8
- package/lib/types/panel.d.ts.map +1 -1
- package/lib/types/panel.js.map +1 -1
- package/lib/types/parse.d.ts +24 -8
- package/lib/types/parse.d.ts.map +1 -1
- package/lib/types/parse.js.map +1 -1
- package/lib/types/review-cache.d.ts +29 -19
- package/lib/types/review-cache.d.ts.map +1 -1
- package/lib/types/review-cache.js.map +1 -1
- package/lib/types/states.d.ts +11 -7
- package/lib/types/states.d.ts.map +1 -1
- package/lib/types/states.js.map +1 -1
- package/lib/types/types.d.ts +266 -20
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/viewer-lists.d.ts +113 -0
- package/lib/types/viewer-lists.d.ts.map +1 -0
- package/lib/types/viewer-lists.js.map +1 -0
- package/lib/types/worktree.d.ts +20 -11
- package/lib/types/worktree.d.ts.map +1 -1
- package/lib/types/worktree.js.map +1 -1
- package/locale/de.json +1 -1
- package/locale/en.json +1 -1
- package/locale/es.json +1 -1
- package/locale/fr.json +1 -1
- package/locale/ja.json +1 -1
- package/locale/pt.json +1 -1
- package/locale/ru.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +58 -49
- package/src/branch-name.ts +74 -0
- package/src/client/AttentionIndicator.tsx +37 -0
- package/src/client/BaseMenu.module.css +0 -20
- package/src/client/BaseMenu.tsx +9 -52
- package/src/client/ChangeRequestCard.tsx +276 -131
- package/src/client/ChangeRequestOverview.module.css +1 -1
- package/src/client/ChangeRequestOverview.tsx +183 -67
- package/src/client/ChangeRequestsSection.tsx +234 -0
- package/src/client/ChangedFiles.module.css +5 -1
- package/src/client/ChangedFiles.tsx +72 -36
- package/src/client/ChangesLoading.module.css +110 -0
- package/src/client/ChangesLoading.tsx +69 -0
- package/src/client/ChangesTab.module.css +83 -114
- package/src/client/ChangesTab.tsx +331 -100
- package/src/client/ChangesTabTitle.tsx +3 -3
- package/src/client/DiffFile.tsx +241 -45
- package/src/client/EnvironmentRows.tsx +263 -0
- package/src/client/FileLabel.tsx +1 -1
- package/src/client/FileTreePane.tsx +11 -6
- package/src/client/{ForgeTab.module.css → Forge.module.css} +130 -275
- package/src/client/LensFilter.module.css +87 -0
- package/src/client/LensFilter.tsx +105 -0
- package/src/client/ReasonButton.tsx +23 -0
- package/src/client/ReviewComposer.module.css +2 -8
- package/src/client/ReviewComposer.tsx +27 -8
- package/src/client/ReviewControls.module.css +39 -0
- package/src/client/ReviewControls.tsx +71 -15
- package/src/client/ReviewThread.tsx +55 -30
- package/src/client/ReviewThreads.module.css +24 -0
- package/src/client/ReviewThreads.tsx +56 -21
- package/src/client/SessionHoverForge.tsx +2 -1
- package/src/client/SubmitReview.tsx +11 -8
- package/src/client/ThreadList.tsx +1 -1
- package/src/client/ViewOptionsMenu.tsx +19 -4
- package/src/client/WorktreeNameDialog.module.css +53 -0
- package/src/client/WorktreeNameDialog.tsx +93 -0
- package/src/client/WorktreeProgress.tsx +100 -35
- package/src/client/WorktreeToggle.module.css +121 -5
- package/src/client/WorktreeToggle.tsx +178 -61
- package/src/client/action-notices.ts +38 -0
- package/src/client/annotations.ts +105 -0
- package/src/client/branch-search.tsx +77 -0
- package/src/client/change-requests-store.ts +50 -0
- package/src/client/changes-address.ts +3 -1
- package/src/client/changes-service.ts +173 -0
- package/src/client/changes-store.ts +103 -91
- package/src/client/checkout.ts +2 -1
- package/src/client/diff-rows.ts +100 -16
- package/src/client/file-tree.ts +29 -0
- package/src/client/forge-copy.ts +49 -0
- package/src/client/format.ts +14 -0
- package/src/client/glyphs.tsx +12 -13
- package/src/client/highlight-context.ts +213 -0
- package/src/client/index.ts +20 -5
- package/src/client/lens-filter.ts +136 -0
- package/src/client/locales.ts +1504 -288
- package/src/client/mount.ts +228 -109
- package/src/client/review-page/ReviewChat.tsx +311 -0
- package/src/client/review-page/ReviewDetail.tsx +331 -0
- package/src/client/review-page/ReviewLabels.tsx +94 -0
- package/src/client/review-page/ReviewList.tsx +461 -0
- package/src/client/review-page/ReviewNav.tsx +47 -0
- package/src/client/review-page/ReviewPage.module.css +946 -0
- package/src/client/review-page/ReviewPage.tsx +287 -0
- package/src/client/review-page/ReviewStatus.tsx +259 -0
- package/src/client/review-page/host-stream.ts +63 -0
- package/src/client/review-page/review-lists.ts +207 -0
- package/src/client/review-page/review-mount.ts +228 -0
- package/src/client/review-page/review-store.ts +94 -0
- package/src/client/review-queue.ts +30 -0
- package/src/client/review-threads.ts +0 -12
- package/src/client/review.ts +27 -0
- package/src/client/slots.ts +92 -0
- package/src/client/source.ts +67 -43
- package/src/client/status.ts +16 -4
- package/src/git.ts +16 -38
- package/src/index.ts +900 -152
- package/src/lens-version.ts +27 -0
- package/src/lenses.ts +284 -0
- package/src/local-diff.ts +48 -1
- package/src/panel.ts +123 -28
- package/src/parse.ts +86 -10
- package/src/review-cache.ts +57 -37
- package/src/states.ts +38 -18
- package/src/types.ts +267 -21
- package/src/viewer-lists.ts +375 -0
- package/src/worktree.ts +64 -34
- package/lib/types/client/ForgeTab.d.ts +0 -65
- package/lib/types/client/ForgeTab.d.ts.map +0 -1
- package/lib/types/client/ForgeTab.js.map +0 -1
- package/lib/types/client/ForgeTabTitle.d.ts +0 -11
- package/lib/types/client/ForgeTabTitle.d.ts.map +0 -1
- package/lib/types/client/ForgeTabTitle.js.map +0 -1
- package/lib/types/client/HeaderButton.d.ts +0 -27
- package/lib/types/client/HeaderButton.d.ts.map +0 -1
- package/lib/types/client/HeaderButton.js.map +0 -1
- package/lib/types/client/LocalChangesCard.d.ts +0 -29
- package/lib/types/client/LocalChangesCard.d.ts.map +0 -1
- package/lib/types/client/LocalChangesCard.js.map +0 -1
- package/src/client/ForgeTab.tsx +0 -263
- package/src/client/ForgeTabTitle.tsx +0 -21
- package/src/client/HeaderButton.module.css +0 -29
- package/src/client/HeaderButton.tsx +0 -68
- package/src/client/LocalChangesCard.tsx +0 -83
package/src/types.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
/** Browser-safe panel state, the worktree request record, Remote error codes, and Host configuration of the forge panel. */
|
|
2
2
|
|
|
3
3
|
import type {} from '@deepseek-ai/dsh-typert-protocol'
|
|
4
|
-
import type {
|
|
4
|
+
import type { Branded } from '@deepseek-ai/dsh-brand'
|
|
5
|
+
import type {
|
|
6
|
+
ChangeRequestRef, ChangeRequestSnapshot, ChangeRequestSummary, ChangeRequestUpdate, ForgeCommit, ForgeDescription, ForgeFailure,
|
|
7
|
+
ForgeReadiness, ForgeRepository, ForgeViewerFilter,
|
|
8
|
+
} from '@deepseek-ai/dsh-experimental-forge/types'
|
|
5
9
|
import type { SessionChangeRequest } from '@deepseek-ai/dsh-experimental-forge-session/types'
|
|
6
10
|
|
|
7
11
|
/** Git facts for the checkout that contains the Session's current directory. */
|
|
@@ -33,7 +37,10 @@ export interface ForgeSessionWorktree {
|
|
|
33
37
|
readonly path: string
|
|
34
38
|
/** Branch created for the checkout. */
|
|
35
39
|
readonly branch: string
|
|
36
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Requested base: the full name of a local or remote-tracking branch, a short branch name that earlier panels
|
|
42
|
+
* recorded, or null when the checkout started from HEAD of the source checkout.
|
|
43
|
+
*/
|
|
37
44
|
readonly from: string | null
|
|
38
45
|
/** Commit object name the branch started from. */
|
|
39
46
|
readonly baseCommit: string
|
|
@@ -43,8 +50,11 @@ export interface ForgeSessionWorktree {
|
|
|
43
50
|
|
|
44
51
|
/** Payload of the `plugin:client-ui-forge/worktree` record. */
|
|
45
52
|
export type WorktreeRecord =
|
|
46
|
-
/**
|
|
47
|
-
|
|
53
|
+
/**
|
|
54
|
+
* Create a worktree before the Session's first step, starting from `from`, or from HEAD when it is null, on the
|
|
55
|
+
* branch `name`, or on a generated branch name when `name` is absent.
|
|
56
|
+
*/
|
|
57
|
+
| { readonly action: 'request'; readonly from: string | null; readonly name?: string }
|
|
48
58
|
/** Withdraw the open request. */
|
|
49
59
|
| { readonly action: 'cancel' }
|
|
50
60
|
/** The requested worktree was created and became the Session's working directory. */
|
|
@@ -56,8 +66,13 @@ export type WorktreeRecord =
|
|
|
56
66
|
|
|
57
67
|
/** One open worktree request. */
|
|
58
68
|
export interface ForgeWorktreeRequest {
|
|
59
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Base: the full name of a local or remote-tracking branch, a short branch name that earlier panels recorded, or
|
|
71
|
+
* null for HEAD of the source checkout. A remote-tracking branch is fetched before each attempt that does not skip it.
|
|
72
|
+
*/
|
|
60
73
|
readonly from: string | null
|
|
74
|
+
/** New branch name the user chose, which every attempt uses, or null for a generated name per attempt. */
|
|
75
|
+
readonly name: string | null
|
|
61
76
|
}
|
|
62
77
|
|
|
63
78
|
/** Host-only state of the `forgeWorktree` projection. */
|
|
@@ -87,12 +102,17 @@ export type ForgeWorktreeBlocker =
|
|
|
87
102
|
|
|
88
103
|
/** One running worktree creation. */
|
|
89
104
|
export interface ForgeWorktreeCreation {
|
|
90
|
-
/**
|
|
91
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Running step: `fetch` fetches a remote base branch, `prepare` validates and creates the branch, then
|
|
107
|
+
* `checkout` writes the files.
|
|
108
|
+
*/
|
|
109
|
+
readonly phase: 'fetch' | 'prepare' | 'checkout'
|
|
92
110
|
/** Branch the attempt creates. */
|
|
93
111
|
readonly branch: string
|
|
94
|
-
/** Base
|
|
112
|
+
/** Base as the request names it, or null for HEAD. */
|
|
95
113
|
readonly from: string | null
|
|
114
|
+
/** Whether the attempt fetches its remote base branch first. */
|
|
115
|
+
readonly fetch: boolean
|
|
96
116
|
/**
|
|
97
117
|
* Whether a message waits for the creation before its turn starts. Only
|
|
98
118
|
* such a creation can be stopped, after which the message keeps waiting; a
|
|
@@ -111,12 +131,16 @@ export interface ForgeWorktreeRestoration {
|
|
|
111
131
|
export interface ForgeWorktreeFailure {
|
|
112
132
|
/** Branch the attempt created, or null when it failed before naming one. */
|
|
113
133
|
readonly branch: string | null
|
|
114
|
-
/** Base
|
|
134
|
+
/** Base of the attempt as the request names it, or null for HEAD. */
|
|
115
135
|
readonly from: string | null
|
|
136
|
+
/** Whether the attempt fetched, or tried to fetch, its remote base branch first. */
|
|
137
|
+
readonly fetch: boolean
|
|
116
138
|
/** Step that failed. */
|
|
117
|
-
readonly phase: 'prepare' | 'checkout'
|
|
139
|
+
readonly phase: 'fetch' | 'prepare' | 'checkout'
|
|
118
140
|
/** Failure text. */
|
|
119
141
|
readonly message: string
|
|
142
|
+
/** Whether the branch or the checkout directory of that name already existed, which another name avoids. */
|
|
143
|
+
readonly exists: boolean
|
|
120
144
|
}
|
|
121
145
|
|
|
122
146
|
/**
|
|
@@ -141,6 +165,8 @@ export interface ForgePanelWorktree {
|
|
|
141
165
|
readonly editable: boolean
|
|
142
166
|
/** Why the checkout cannot host a worktree, or null when it can, before the first inspection, and after a failed one. */
|
|
143
167
|
readonly blocker: ForgeWorktreeBlocker | null
|
|
168
|
+
/** Prefix of generated branch names, the Config `worktreePrefix`, which a name the user types starts from. */
|
|
169
|
+
readonly namePrefix: string
|
|
144
170
|
/** Open request, or null without one. */
|
|
145
171
|
readonly request: ForgeWorktreeRequest | null
|
|
146
172
|
/** Created worktree, or null before creation. */
|
|
@@ -181,10 +207,71 @@ export type ForgeChangeRequestStatesFrame =
|
|
|
181
207
|
| { readonly type: 'baseline'; readonly states: readonly ForgeChangeRequestListState[] }
|
|
182
208
|
| { readonly type: 'changed'; readonly states: readonly ForgeChangeRequestListState[] }
|
|
183
209
|
|
|
210
|
+
/** One list of the review page: the latest successful read of one viewer list on one host, and the latest failure. */
|
|
211
|
+
export interface ForgeReviewList {
|
|
212
|
+
/** Change requests most recently updated first, from the latest successful read, or null before the first. */
|
|
213
|
+
readonly items: readonly ChangeRequestSummary[] | null
|
|
214
|
+
/** Size of the whole list the host reported with `items`; 0 before the first successful read. */
|
|
215
|
+
readonly total: number
|
|
216
|
+
/** Epoch milliseconds of the read `items` come from, or null before the first successful read. */
|
|
217
|
+
readonly fetchedAt: number | null
|
|
218
|
+
/** Why the latest read failed, or null when it succeeded or none settled yet. */
|
|
219
|
+
readonly failure: ForgeFailure | null
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** The review page's lists on one host of one provider. */
|
|
223
|
+
export interface ForgeReviewHost {
|
|
224
|
+
/** Forge family of the provider. */
|
|
225
|
+
readonly forge: string
|
|
226
|
+
/** Lowercase host name. */
|
|
227
|
+
readonly host: string
|
|
228
|
+
/** Login of the signed-in user the latest successful read named, or null before one. */
|
|
229
|
+
readonly viewer: string | null
|
|
230
|
+
/** Each list the provider offers on the host; a list it does not offer is absent. */
|
|
231
|
+
readonly lists: Partial<Readonly<Record<ForgeViewerFilter, ForgeReviewList>>>
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Everything the review page lists, as one frame. */
|
|
235
|
+
export interface ForgeReviewFrame {
|
|
236
|
+
/** Each host a provider lists change requests on, in registration and configuration order. */
|
|
237
|
+
readonly hosts: readonly ForgeReviewHost[]
|
|
238
|
+
/** Whether a read is in flight. */
|
|
239
|
+
readonly reading: boolean
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
/** The number the review page's navigation entry shows. */
|
|
243
|
+
export interface ForgeReviewCountFrame {
|
|
244
|
+
/** Open change requests that ask the signed-in user for a review, summed over the hosts read, or null before any count. */
|
|
245
|
+
readonly reviewRequested: number | null
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** One change request the review page shows in full, with its latest polling result. */
|
|
249
|
+
export interface ForgeReviewChangeRequest {
|
|
250
|
+
/** Web URL the page asked for. */
|
|
251
|
+
readonly url: string
|
|
252
|
+
/** Parsed reference. */
|
|
253
|
+
readonly ref: ChangeRequestRef
|
|
254
|
+
/** How readers name the change request's code host and its change requests, or null once its provider left. */
|
|
255
|
+
readonly forge: ForgeDescription | null
|
|
256
|
+
/** Latest polling result, or null before the first poll. */
|
|
257
|
+
readonly update: ChangeRequestUpdate | null
|
|
258
|
+
/** Latest snapshot a poll returned, kept while later polls fail, or null before the first successful poll. */
|
|
259
|
+
readonly snapshot: ChangeRequestSnapshot | null
|
|
260
|
+
/** Number of review changes `forge/review-changed` announced for the change request since the panel host started. */
|
|
261
|
+
readonly reviewRevision: number
|
|
262
|
+
}
|
|
263
|
+
|
|
184
264
|
/** One bound change request in the panel state. */
|
|
185
265
|
export interface ForgePanelChangeRequest extends SessionChangeRequest {
|
|
266
|
+
/** How readers name the change request's code host and its change requests, or null when no provider serves its URL. */
|
|
267
|
+
readonly forge: ForgeDescription | null
|
|
186
268
|
/** Latest snapshot a poll returned, kept while later polls fail, or null before the first successful poll. */
|
|
187
269
|
readonly snapshot: ChangeRequestSnapshot | null
|
|
270
|
+
/**
|
|
271
|
+
* Number of review changes `forge/review-changed` announced for the change request since the panel host started; it
|
|
272
|
+
* grows when any plugin's write is accepted, so a reader shows threads and viewed marks read after it.
|
|
273
|
+
*/
|
|
274
|
+
readonly reviewRevision: number
|
|
188
275
|
}
|
|
189
276
|
|
|
190
277
|
/** Everything the panel shows for one Session. */
|
|
@@ -208,12 +295,35 @@ export interface ForgePanelState {
|
|
|
208
295
|
readonly local: ForgeLocalChanges | null
|
|
209
296
|
}
|
|
210
297
|
|
|
211
|
-
/**
|
|
212
|
-
export interface
|
|
213
|
-
/** Checked-out branch, or null when HEAD is detached. */
|
|
214
|
-
readonly current:
|
|
215
|
-
/**
|
|
216
|
-
readonly
|
|
298
|
+
/** Branches offered as the base of a new worktree whose names contain a query. */
|
|
299
|
+
export interface ForgeWorktreeBases {
|
|
300
|
+
/** Checked-out branch, or null when HEAD is detached or its name does not contain the query. */
|
|
301
|
+
readonly current: ForgeBaseBranch | null
|
|
302
|
+
/** Default branch of each remote that names one with `refs/remotes/<remote>/HEAD`, in remote order. */
|
|
303
|
+
readonly defaults: readonly ForgeRemoteDefault[]
|
|
304
|
+
/** Other local branches, most recently committed first, at most `maxBranches`. */
|
|
305
|
+
readonly local: readonly ForgeBaseBranch[]
|
|
306
|
+
/**
|
|
307
|
+
* Remote-tracking branches of each configured remote in remote order: the remote the checked-out branch tracks,
|
|
308
|
+
* then `origin`, then the others as Git lists them. Remotes without a matching branch are left out.
|
|
309
|
+
*/
|
|
310
|
+
readonly remotes: readonly ForgeRemoteBranches[]
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
/** A remote's default branch, which `refs/remotes/<remote>/HEAD` names. */
|
|
314
|
+
export interface ForgeRemoteDefault extends ForgeBaseBranch {
|
|
315
|
+
/** Remote the branch belongs to; it may contain `/`. */
|
|
316
|
+
readonly remote: string
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
/** Remote-tracking branches of one remote, without its default branch. */
|
|
320
|
+
export interface ForgeRemoteBranches {
|
|
321
|
+
/** Remote name such as `origin`; it may contain `/`. */
|
|
322
|
+
readonly name: string
|
|
323
|
+
/** `owner/name` of the repository a provider recognizes from the remote's URLs, else its fetch URL, or null without one. */
|
|
324
|
+
readonly repository: string | null
|
|
325
|
+
/** Branches named `<remote>/<branch>`, most recently committed first, at most `maxBranches`. */
|
|
326
|
+
readonly branches: readonly ForgeBaseBranch[]
|
|
217
327
|
}
|
|
218
328
|
|
|
219
329
|
/** A branch the `branch` scope can compare with. */
|
|
@@ -347,6 +457,102 @@ export interface ForgeChangeRequestDiff {
|
|
|
347
457
|
readonly fileUrls: Readonly<Record<string, string>>
|
|
348
458
|
}
|
|
349
459
|
|
|
460
|
+
/** Opaque identity of a filter lens, chosen by the plugin that registers it, such as `example/public-interface`. */
|
|
461
|
+
export type ForgeLensId = Branded<'ForgeLensId'>
|
|
462
|
+
|
|
463
|
+
/** One changed file a lens classifies: the diff's description of it, without the lines. */
|
|
464
|
+
export type ForgeLensFile = Pick<ForgeDiffFile, 'path' | 'previousPath' | 'status' | 'binary' | 'layer' | 'hunks' | 'digest'>
|
|
465
|
+
|
|
466
|
+
/** Lines `start` through `end` of one side of a file, both inclusive and 1-based. */
|
|
467
|
+
export interface ForgeLineRange {
|
|
468
|
+
readonly start: number
|
|
469
|
+
readonly end: number
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
/** What a lens keeps of one file. */
|
|
473
|
+
export interface ForgeLensKeep {
|
|
474
|
+
/**
|
|
475
|
+
* Lines the lens is about on each side; hunks that touch none of them fold into one row the reader can expand.
|
|
476
|
+
* Omitted: every hunk of the file shows.
|
|
477
|
+
*/
|
|
478
|
+
readonly ranges?: { readonly old: readonly ForgeLineRange[]; readonly new: readonly ForgeLineRange[] }
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
/** The files a lens keeps, by path; a file the result does not name is filtered out. */
|
|
482
|
+
export interface ForgeLensResult {
|
|
483
|
+
readonly files: Readonly<Record<string, ForgeLensKeep>>
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/** What a changes view shows, as a lens sees it. */
|
|
487
|
+
export type ForgeLensSource =
|
|
488
|
+
/** Local changes of a Session's checkout in one scope. */
|
|
489
|
+
| { readonly kind: 'local'; readonly scope: ForgeLocalScope }
|
|
490
|
+
/** A change request at one head commit, whole or as consecutive commits. */
|
|
491
|
+
| { readonly kind: 'change'; readonly ref: ChangeRequestRef; readonly headSha: string; readonly commits: ForgeCommitRange | null }
|
|
492
|
+
|
|
493
|
+
/** What one `classify` call receives. */
|
|
494
|
+
export interface ForgeLensInput {
|
|
495
|
+
/** What the view shows. */
|
|
496
|
+
readonly source: ForgeLensSource
|
|
497
|
+
/** Every file of the diff in display order, with the layer the panel gave it. */
|
|
498
|
+
readonly files: readonly ForgeLensFile[]
|
|
499
|
+
/**
|
|
500
|
+
* Read one side of a file of `files`, by its `path`: the old side reads `previousPath` for a renamed file. Resolves to
|
|
501
|
+
* null when the side does not exist, as the old side of an added file, or holds binary content. Rejects for a path not
|
|
502
|
+
* in `files`, once the reads of one call exceed the panel's `maxLensReadBytes`, for an old side the provider cannot
|
|
503
|
+
* locate, and when the read fails.
|
|
504
|
+
*/
|
|
505
|
+
text(side: 'old' | 'new', path: string, signal: AbortSignal): Promise<string | null>
|
|
506
|
+
/** Report how many of `total` units the lens finished; the changes view shows it while the lens runs. */
|
|
507
|
+
progress(done: number, total: number): void
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/** A filter over the files of a changes view, which a plugin registers with `ctx.forgePanel.registerLens()`. */
|
|
511
|
+
export interface ForgeLens {
|
|
512
|
+
/** Identity the plugin chooses; one registration holds an id at a time. */
|
|
513
|
+
readonly id: ForgeLensId
|
|
514
|
+
/** Changes whenever `classify` may answer differently for the same input, which drops results kept under another version. */
|
|
515
|
+
readonly version: string
|
|
516
|
+
/**
|
|
517
|
+
* Decide which files the lens keeps and which lines it is about. The signal aborts when the reader stops waiting, the
|
|
518
|
+
* registration ends, or `lensTimeoutMs` passes; a rejection fails the request without a partial result.
|
|
519
|
+
*/
|
|
520
|
+
classify(input: ForgeLensInput, signal: AbortSignal): Promise<ForgeLensResult>
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
/** What a changes view asks a lens to classify: its source, the version of the files it shows, and the lens. */
|
|
524
|
+
export interface ForgeLensRequest {
|
|
525
|
+
/** The view's source: local changes in a scope, or a binding URL with its chosen commits. */
|
|
526
|
+
readonly source:
|
|
527
|
+
| { readonly kind: 'local'; readonly scope: ForgeLocalScope }
|
|
528
|
+
| { readonly kind: 'change'; readonly url: string; readonly commits: ForgeCommitRange | null }
|
|
529
|
+
/** `lensVersion` of the files the view shows; files read since with another version refuse the request. */
|
|
530
|
+
readonly version: string
|
|
531
|
+
/** Identity of the registered lens. */
|
|
532
|
+
readonly lens: string
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/** One frame of a lens request: how far the lens is, then what it keeps. */
|
|
536
|
+
export type ForgeLensFrame =
|
|
537
|
+
| { readonly kind: 'progress'; readonly done: number; readonly total: number }
|
|
538
|
+
| { readonly kind: 'result'; readonly files: Readonly<Record<string, ForgeLensKeep>> }
|
|
539
|
+
|
|
540
|
+
/** A registered lens as changes views see it. */
|
|
541
|
+
export interface ForgeRegisteredLens {
|
|
542
|
+
/** Identity of the lens. */
|
|
543
|
+
readonly id: string
|
|
544
|
+
/** The lens's `version`; a view does not reuse results of another version. */
|
|
545
|
+
readonly version: string
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
/** Facts about the panel's extensions that every changes view reads. */
|
|
549
|
+
export interface ForgeExtensionState {
|
|
550
|
+
/** The registered lenses, in registration order. */
|
|
551
|
+
readonly lenses: readonly ForgeRegisteredLens[]
|
|
552
|
+
/** Most line annotations a changes view shows in one file, across every annotation source. */
|
|
553
|
+
readonly maxAnnotationsPerFile: number
|
|
554
|
+
}
|
|
555
|
+
|
|
350
556
|
/** Commits of the `branch` scope at one HEAD commit, which the changes view can show one or several of. */
|
|
351
557
|
export interface ForgeLocalCommits {
|
|
352
558
|
/** HEAD commit the list was read at. */
|
|
@@ -369,7 +575,7 @@ export interface ForgeChangedFile {
|
|
|
369
575
|
readonly binary: boolean
|
|
370
576
|
}
|
|
371
577
|
|
|
372
|
-
/** Size of the `branch` scope, which the panel's local changes
|
|
578
|
+
/** Size of the `branch` scope, which the Session panel's local changes row shows. */
|
|
373
579
|
export interface ForgeLocalChanges {
|
|
374
580
|
/** Ref or abbreviated commit the scope compares with. */
|
|
375
581
|
readonly base: string
|
|
@@ -398,7 +604,7 @@ export interface Config {
|
|
|
398
604
|
worktreePrefix?: string
|
|
399
605
|
/** Largest diff, file read to show unchanged lines, or list of base branch refs, in bytes. */
|
|
400
606
|
maxDiffBytes?: number
|
|
401
|
-
/** Most untracked files a local diff or the local changes
|
|
607
|
+
/** Most untracked files a local diff or the local changes row includes. */
|
|
402
608
|
maxUntrackedFiles?: number
|
|
403
609
|
/** Most UTF-8 bytes of change request diffs kept in memory for later reads at the same head commit and base branch. */
|
|
404
610
|
maxCachedDiffBytes?: number
|
|
@@ -414,13 +620,38 @@ export interface Config {
|
|
|
414
620
|
* `testPaths` and before the built-in rules.
|
|
415
621
|
*/
|
|
416
622
|
interfacePaths?: string[]
|
|
417
|
-
/**
|
|
623
|
+
/**
|
|
624
|
+
* Most UTF-8 bytes, as JSON, of change request review threads kept in memory for later reads at the same head commit
|
|
625
|
+
* and update time, and, counted apart, of viewed marks kept for later reads at the same head commit.
|
|
626
|
+
*/
|
|
418
627
|
maxCachedReviewBytes?: number
|
|
419
628
|
/**
|
|
420
|
-
* Age in milliseconds at which review threads kept in memory are read from the code host again; a
|
|
421
|
-
* request's update time does not change when a thread is resolved
|
|
629
|
+
* Age in milliseconds at which review threads and viewed marks kept in memory are read from the code host again; a
|
|
630
|
+
* GitHub pull request's update time does not change when a thread is resolved, and nothing announces a mark changed
|
|
631
|
+
* on the code host itself.
|
|
422
632
|
*/
|
|
423
633
|
reviewRefreshMs?: number
|
|
634
|
+
/**
|
|
635
|
+
* Age in milliseconds past which the status of a change request is read at once when a Session's panel or the
|
|
636
|
+
* review page starts to show it.
|
|
637
|
+
*/
|
|
638
|
+
statusMaxAgeMs?: number
|
|
639
|
+
/** Deadline in milliseconds for one lens `classify` call. */
|
|
640
|
+
lensTimeoutMs?: number
|
|
641
|
+
/** Most UTF-8 bytes of file text one lens `classify` call may read. */
|
|
642
|
+
maxLensReadBytes?: number
|
|
643
|
+
/** Most UTF-8 bytes, as JSON, of lens results kept in memory for later requests with the same files, lens, and lens version. */
|
|
644
|
+
maxCachedLensBytes?: number
|
|
645
|
+
/** Most line annotations a changes view shows in one file, across every annotation source. */
|
|
646
|
+
maxAnnotationsPerFile?: number
|
|
647
|
+
/** Milliseconds between two reads of the review page's lists while the page is open. */
|
|
648
|
+
reviewListIntervalMs?: number
|
|
649
|
+
/** Milliseconds between two reads of the review page's navigation count while it is shown. */
|
|
650
|
+
reviewCountIntervalMs?: number
|
|
651
|
+
/** Largest delay in milliseconds between two reads of the review page's lists or count after consecutive failures. */
|
|
652
|
+
reviewMaxBackoffMs?: number
|
|
653
|
+
/** Most change requests one review page list shows, capped by each provider's own limit. */
|
|
654
|
+
reviewPageSize?: number
|
|
424
655
|
}
|
|
425
656
|
|
|
426
657
|
declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
@@ -433,6 +664,10 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
433
664
|
'forgePanel/worktrees-unavailable': Record<string, never>
|
|
434
665
|
/** The requested base branch name is empty. */
|
|
435
666
|
'forgePanel/invalid-branch': Record<string, never>
|
|
667
|
+
/** The requested new branch name breaks one of Git's branch-name rules, or the worktree service's refusal of a leading `-`. */
|
|
668
|
+
'forgePanel/invalid-name': Record<string, never>
|
|
669
|
+
/** A local branch with the requested new branch name exists in the Session's checkout. */
|
|
670
|
+
'forgePanel/branch-exists': Record<string, never>
|
|
436
671
|
/** The Session has no created worktree to restore or leave. */
|
|
437
672
|
'forgePanel/no-worktree': Record<string, never>
|
|
438
673
|
/** The Session's Agent is not loaded or has other work, so its checkout cannot change now. */
|
|
@@ -482,10 +717,21 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
|
|
|
482
717
|
'forgePanel/viewed-failed': Record<string, never>
|
|
483
718
|
/** The code host did not list the accounts a review can be requested from; the message says why. */
|
|
484
719
|
'forgePanel/reviewers-failed': Record<string, never>
|
|
720
|
+
/** The code host did not provide a change request's description; the message says why. */
|
|
721
|
+
'forgePanel/description-failed': Record<string, never>
|
|
485
722
|
/** The code host's provider cannot read review threads, so the changes view shows none. */
|
|
486
723
|
'forgePanel/review-unsupported': Record<string, never>
|
|
487
724
|
/** The code host did not provide the change request's review threads, or its status has not been read yet; the message says why. */
|
|
488
725
|
'forgePanel/review-failed': Record<string, never>
|
|
726
|
+
/** No lens with the requested identity is registered, as after its plugin unloaded. */
|
|
727
|
+
'forgePanel/lens-missing': Record<string, never>
|
|
728
|
+
/** The files the view shows are no longer the files the panel reads, so the view reads them again before asking. */
|
|
729
|
+
'forgePanel/lens-stale': Record<string, never>
|
|
730
|
+
/**
|
|
731
|
+
* The lens failed, ran past `lensTimeoutMs`, read more than `maxLensReadBytes`, or answered over `maxCachedLensBytes`;
|
|
732
|
+
* the message says which.
|
|
733
|
+
*/
|
|
734
|
+
'forgePanel/lens-failed': Record<string, never>
|
|
489
735
|
}
|
|
490
736
|
}
|
|
491
737
|
|