@deepseek-ai/dsh-experimental-client-ui-forge 0.2.3-alpha.3 → 0.2.3-alpha.4

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.
Files changed (178) hide show
  1. package/README.i18n.yaml +10 -10
  2. package/README.md +16 -15
  3. package/README.zh.md +16 -15
  4. package/lib/client.js +18 -18
  5. package/lib/client.js.map +1 -1
  6. package/lib/index.js +67 -18
  7. package/lib/typert.host.js +89 -45
  8. package/lib/typert.remote-client.d.ts +7 -7
  9. package/lib/typert.remote-client.d.ts.map +1 -1
  10. package/lib/typert.remote-client.js +48 -36
  11. package/lib/types/client/BranchPicker.d.ts.map +1 -1
  12. package/lib/types/client/BranchPicker.js.map +1 -1
  13. package/lib/types/client/ChangeRequestCard.d.ts +10 -1
  14. package/lib/types/client/ChangeRequestCard.d.ts.map +1 -1
  15. package/lib/types/client/ChangeRequestCard.js.map +1 -1
  16. package/lib/types/client/ChangeRequestOverview.d.ts +16 -0
  17. package/lib/types/client/ChangeRequestOverview.d.ts.map +1 -1
  18. package/lib/types/client/ChangeRequestOverview.js.map +1 -1
  19. package/lib/types/client/ChangeRequestsSection.d.ts.map +1 -1
  20. package/lib/types/client/ChangeRequestsSection.js.map +1 -1
  21. package/lib/types/client/ChangeStatus.d.ts +41 -0
  22. package/lib/types/client/ChangeStatus.d.ts.map +1 -0
  23. package/lib/types/client/ChangeStatus.js.map +1 -0
  24. package/lib/types/client/ChangedFiles.d.ts.map +1 -1
  25. package/lib/types/client/ChangedFiles.js.map +1 -1
  26. package/lib/types/client/ChangesTab.d.ts +23 -8
  27. package/lib/types/client/ChangesTab.d.ts.map +1 -1
  28. package/lib/types/client/ChangesTab.js.map +1 -1
  29. package/lib/types/client/CommitMenu.d.ts +8 -5
  30. package/lib/types/client/CommitMenu.d.ts.map +1 -1
  31. package/lib/types/client/CommitMenu.js.map +1 -1
  32. package/lib/types/client/CopyCommandButton.d.ts +19 -0
  33. package/lib/types/client/CopyCommandButton.d.ts.map +1 -0
  34. package/lib/types/client/CopyCommandButton.js.map +1 -0
  35. package/lib/types/client/DiffFile.d.ts +20 -3
  36. package/lib/types/client/DiffFile.d.ts.map +1 -1
  37. package/lib/types/client/DiffFile.js.map +1 -1
  38. package/lib/types/client/EnvironmentRows.d.ts.map +1 -1
  39. package/lib/types/client/EnvironmentRows.js.map +1 -1
  40. package/lib/types/client/FileLabel.d.ts +5 -5
  41. package/lib/types/client/FileLabel.d.ts.map +1 -1
  42. package/lib/types/client/FileLabel.js.map +1 -1
  43. package/lib/types/client/HostSettings.d.ts.map +1 -1
  44. package/lib/types/client/HostSettings.js.map +1 -1
  45. package/lib/types/client/LensFilter.d.ts.map +1 -1
  46. package/lib/types/client/LensFilter.js.map +1 -1
  47. package/lib/types/client/ReviewComposer.d.ts.map +1 -1
  48. package/lib/types/client/ReviewComposer.js.map +1 -1
  49. package/lib/types/client/ReviewControls.d.ts.map +1 -1
  50. package/lib/types/client/ReviewControls.js.map +1 -1
  51. package/lib/types/client/ReviewThread.d.ts.map +1 -1
  52. package/lib/types/client/ReviewThread.js.map +1 -1
  53. package/lib/types/client/ReviewThreads.d.ts +17 -2
  54. package/lib/types/client/ReviewThreads.d.ts.map +1 -1
  55. package/lib/types/client/ReviewThreads.js.map +1 -1
  56. package/lib/types/client/SubmitReview.d.ts.map +1 -1
  57. package/lib/types/client/SubmitReview.js.map +1 -1
  58. package/lib/types/client/ThreadList.d.ts.map +1 -1
  59. package/lib/types/client/ThreadList.js.map +1 -1
  60. package/lib/types/client/ViewOptionsMenu.d.ts.map +1 -1
  61. package/lib/types/client/ViewOptionsMenu.js.map +1 -1
  62. package/lib/types/client/WorktreeNameDialog.d.ts.map +1 -1
  63. package/lib/types/client/WorktreeNameDialog.js.map +1 -1
  64. package/lib/types/client/WorktreeProgress.d.ts.map +1 -1
  65. package/lib/types/client/WorktreeProgress.js.map +1 -1
  66. package/lib/types/client/WorktreeSettings.d.ts.map +1 -1
  67. package/lib/types/client/WorktreeSettings.js.map +1 -1
  68. package/lib/types/client/WorktreeToggle.d.ts.map +1 -1
  69. package/lib/types/client/WorktreeToggle.js.map +1 -1
  70. package/lib/types/client/changes-store.d.ts +7 -4
  71. package/lib/types/client/changes-store.d.ts.map +1 -1
  72. package/lib/types/client/changes-store.js.map +1 -1
  73. package/lib/types/client/glyphs.d.ts +14 -1
  74. package/lib/types/client/glyphs.d.ts.map +1 -1
  75. package/lib/types/client/glyphs.js.map +1 -1
  76. package/lib/types/client/index.d.ts +1 -2
  77. package/lib/types/client/index.d.ts.map +1 -1
  78. package/lib/types/client/index.js.map +1 -1
  79. package/lib/types/client/locales.d.ts +5 -4
  80. package/lib/types/client/locales.d.ts.map +1 -1
  81. package/lib/types/client/locales.js.map +1 -1
  82. package/lib/types/client/minute-clock.d.ts +7 -0
  83. package/lib/types/client/minute-clock.d.ts.map +1 -0
  84. package/lib/types/client/minute-clock.js.map +1 -0
  85. package/lib/types/client/mount.d.ts.map +1 -1
  86. package/lib/types/client/mount.js.map +1 -1
  87. package/lib/types/client/review-page/ReviewActivity.d.ts.map +1 -1
  88. package/lib/types/client/review-page/ReviewActivity.js.map +1 -1
  89. package/lib/types/client/review-page/ReviewChat.d.ts.map +1 -1
  90. package/lib/types/client/review-page/ReviewChat.js.map +1 -1
  91. package/lib/types/client/review-page/ReviewDetail.d.ts +4 -1
  92. package/lib/types/client/review-page/ReviewDetail.d.ts.map +1 -1
  93. package/lib/types/client/review-page/ReviewDetail.js.map +1 -1
  94. package/lib/types/client/review-page/ReviewList.d.ts.map +1 -1
  95. package/lib/types/client/review-page/ReviewList.js.map +1 -1
  96. package/lib/types/client/review-page/ReviewPage.d.ts +2 -2
  97. package/lib/types/client/review-page/ReviewPage.d.ts.map +1 -1
  98. package/lib/types/client/review-page/ReviewPage.js.map +1 -1
  99. package/lib/types/client/review-page/ReviewStatus.d.ts +17 -13
  100. package/lib/types/client/review-page/ReviewStatus.d.ts.map +1 -1
  101. package/lib/types/client/review-page/ReviewStatus.js.map +1 -1
  102. package/lib/types/client/review-page/review-store.d.ts +1 -1
  103. package/lib/types/client/review-threads.d.ts +14 -7
  104. package/lib/types/client/review-threads.d.ts.map +1 -1
  105. package/lib/types/client/review-threads.js.map +1 -1
  106. package/lib/types/client/status.d.ts +0 -6
  107. package/lib/types/client/status.d.ts.map +1 -1
  108. package/lib/types/client/status.js.map +1 -1
  109. package/lib/types/client/thread-state.d.ts +2 -2
  110. package/lib/types/client/thread-state.d.ts.map +1 -1
  111. package/lib/types/client/thread-state.js.map +1 -1
  112. package/lib/types/client/toolbar-fold.d.ts +16 -6
  113. package/lib/types/client/toolbar-fold.d.ts.map +1 -1
  114. package/lib/types/client/toolbar-fold.js.map +1 -1
  115. package/lib/types/index.d.ts +25 -12
  116. package/lib/types/index.d.ts.map +1 -1
  117. package/lib/types/index.js.map +1 -1
  118. package/lib/types/panel.js.map +1 -1
  119. package/lib/types/types.d.ts +22 -5
  120. package/lib/types/types.d.ts.map +1 -1
  121. package/lib/types/worktree.js.map +1 -1
  122. package/package.json +60 -58
  123. package/src/client/BaseMenu.module.css +6 -3
  124. package/src/client/BranchPicker.tsx +28 -19
  125. package/src/client/ChangeRequestCard.tsx +71 -41
  126. package/src/client/ChangeRequestOverview.tsx +174 -74
  127. package/src/client/ChangeRequestsSection.tsx +33 -8
  128. package/src/client/ChangeStatus.module.css +70 -0
  129. package/src/client/ChangeStatus.tsx +104 -0
  130. package/src/client/ChangedFiles.tsx +20 -7
  131. package/src/client/ChangesTab.module.css +89 -20
  132. package/src/client/ChangesTab.tsx +332 -134
  133. package/src/client/CommitMenu.tsx +77 -38
  134. package/src/client/CopyCommandButton.tsx +25 -0
  135. package/src/client/DiffFile.tsx +83 -21
  136. package/src/client/EnvironmentRows.tsx +13 -11
  137. package/src/client/FileLabel.module.css +16 -18
  138. package/src/client/FileLabel.tsx +15 -31
  139. package/src/client/Forge.module.css +3 -10
  140. package/src/client/HostSettings.tsx +10 -8
  141. package/src/client/LensFilter.tsx +11 -9
  142. package/src/client/ReviewComposer.tsx +29 -17
  143. package/src/client/ReviewControls.tsx +8 -6
  144. package/src/client/ReviewThread.tsx +63 -21
  145. package/src/client/ReviewThreads.tsx +126 -34
  146. package/src/client/SubmitReview.tsx +5 -3
  147. package/src/client/ThreadList.module.css +4 -3
  148. package/src/client/ThreadList.tsx +5 -5
  149. package/src/client/ViewOptionsMenu.tsx +10 -8
  150. package/src/client/WorktreeNameDialog.tsx +15 -11
  151. package/src/client/WorktreeProgress.tsx +11 -9
  152. package/src/client/WorktreeSettings.tsx +4 -3
  153. package/src/client/WorktreeToggle.tsx +65 -35
  154. package/src/client/changes-store.ts +8 -5
  155. package/src/client/glyphs.tsx +23 -1
  156. package/src/client/index.ts +1 -2
  157. package/src/client/locales.ts +40 -32
  158. package/src/client/minute-clock.ts +19 -0
  159. package/src/client/mount.ts +66 -51
  160. package/src/client/review-page/ReviewActivity.tsx +5 -4
  161. package/src/client/review-page/ReviewChat.tsx +46 -17
  162. package/src/client/review-page/ReviewDetail.tsx +62 -31
  163. package/src/client/review-page/ReviewList.tsx +23 -18
  164. package/src/client/review-page/ReviewPage.module.css +81 -10
  165. package/src/client/review-page/ReviewPage.tsx +43 -35
  166. package/src/client/review-page/ReviewStatus.tsx +64 -39
  167. package/src/client/review-threads.ts +23 -11
  168. package/src/client/status.ts +0 -9
  169. package/src/client/thread-state.ts +8 -7
  170. package/src/client/toolbar-fold.ts +59 -14
  171. package/src/index.ts +78 -20
  172. package/src/panel.ts +1 -1
  173. package/src/types.ts +24 -5
  174. package/src/worktree.ts +1 -1
  175. package/lib/types/client/AttentionIndicator.d.ts +0 -22
  176. package/lib/types/client/AttentionIndicator.d.ts.map +0 -1
  177. package/lib/types/client/AttentionIndicator.js.map +0 -1
  178. package/src/client/AttentionIndicator.tsx +0 -37
package/src/types.ts CHANGED
@@ -386,6 +386,19 @@ export interface ForgeCommitRange {
386
386
  readonly to: string
387
387
  }
388
388
 
389
+ /**
390
+ * The changes of a change request up to one commit, from the merge base of its base commit with that commit: what the
391
+ * whole change request showed while that commit was its head. The commit need not be among the change request's listed
392
+ * commits, as after its branch was rewritten.
393
+ */
394
+ export interface ForgeCommitsUpTo {
395
+ /** Full object name of the commit the changes end at. */
396
+ readonly upTo: string
397
+ }
398
+
399
+ /** The commits a change request view shows instead of the whole change request. */
400
+ export type ForgeChangeCommits = ForgeCommitRange | ForgeCommitsUpTo
401
+
389
402
  /**
390
403
  * Which local changes a diff covers. Without `head` each reads the checkout of the Session's current directory through
391
404
  * Git. With `head`, the full ref name of a branch under `refs/heads/` or `refs/remotes/`, it reads that branch in place
@@ -516,7 +529,7 @@ export interface ForgeLocalWriteResult {
516
529
 
517
530
  /** Changes of a change request, or of consecutive commits of it, as its code host computes them. */
518
531
  export interface ForgeChangeRequestDiff {
519
- /** Commit whose new side the diff describes: the head, or the last chosen commit. */
532
+ /** Commit whose new side the diff describes: the head, the last chosen commit, or the commit the changes go up to. */
520
533
  readonly headSha: string
521
534
  /** Changed files in the host's order. */
522
535
  readonly files: readonly ForgeDiffFile[]
@@ -559,7 +572,10 @@ export interface ForgeLensResult {
559
572
  export type ForgeLensSource =
560
573
  /** Local changes of a Session's checkout in one scope. */
561
574
  | { readonly kind: 'local'; readonly scope: ForgeLocalScope }
562
- /** A change request at one head commit, whole or as consecutive commits. */
575
+ /**
576
+ * A change request at one head commit, whole or as consecutive commits. A view of its changes up to an earlier commit
577
+ * is the whole change request with that commit as `headSha`.
578
+ */
563
579
  | { readonly kind: 'change'; readonly ref: ChangeRequestRef; readonly headSha: string; readonly commits: ForgeCommitRange | null }
564
580
 
565
581
  /** What one `classify` call receives. */
@@ -594,10 +610,10 @@ export interface ForgeLens {
594
610
 
595
611
  /** What a changes view asks a lens to classify: its source, the version of the files it shows, and the lens. */
596
612
  export interface ForgeLensRequest {
597
- /** The view's source: local changes in a scope, or a binding URL with its chosen commits. */
613
+ /** The view's source: local changes in a scope, or a binding URL with its chosen commits or the commit its changes go up to. */
598
614
  readonly source:
599
615
  | { readonly kind: 'local'; readonly scope: ForgeLocalScope }
600
- | { readonly kind: 'change'; readonly url: string; readonly commits: ForgeCommitRange | null }
616
+ | { readonly kind: 'change'; readonly url: string; readonly commits: ForgeChangeCommits | null }
601
617
  /** `lensVersion` of the files the view shows; files read since with another version refuse the request. */
602
618
  readonly version: string
603
619
  /** Identity of the registered lens. */
@@ -788,7 +804,10 @@ declare module '@deepseek-ai/dsh-typert-protocol' {
788
804
  'forgePanel/checks-failed': Record<string, never>
789
805
  /** The code host did not provide the change request's diff or file, or its status has not been read yet; the message says why. */
790
806
  'forgePanel/diff-failed': Record<string, never>
791
- /** A chosen commit is no longer among the listed commits of the branch or change request, or the commits are out of order. */
807
+ /**
808
+ * A chosen commit is no longer among the listed commits of the branch or change request, the commits are out of
809
+ * order, or the commit a change request's changes go up to is not a full object name or one the code host has.
810
+ */
792
811
  'forgePanel/commits-missing': Record<string, never>
793
812
  /** A chosen commit after the first lacks the commit listed before it as its first parent, so two ends cannot name the run. */
794
813
  'forgePanel/commits-not-linear': Record<string, never>
package/src/worktree.ts CHANGED
@@ -5,7 +5,7 @@ import type { Context } from '@deepseek-ai/cordis'
5
5
  import type { Agent, PreStepDecision } from '@deepseek-ai/dsh-agent'
6
6
  import { CREATED_RECORD, createdWorktreeSchema, generatedWorktreeName } from '@deepseek-ai/dsh-experimental-worktree'
7
7
  import type { CreatedWorktree, CreateWorktreePhase } from '@deepseek-ai/dsh-experimental-worktree'
8
- import { appendPluginRecord, pluginRecordOf } from '@deepseek-ai/dsh-session'
8
+ import { appendPluginRecord, pluginRecordOf } from '@deepseek-ai/dsh-session-store'
9
9
  import type { Session, SessionEvent } from '@deepseek-ai/dsh-session'
10
10
  import type { ProjectionDefinition, ProjectionHandle } from '@deepseek-ai/dsh-session-projection'
11
11
  import { assertNever } from '@deepseek-ai/dsh-util-values'
@@ -1,22 +0,0 @@
1
- /** Mark over the Session panel toggle while a bound change request needs attention. */
2
- import type { ReactNode } from 'react';
3
- import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots/client';
4
- import type { NS } from './locales.ts';
5
- import type { PanelSnapshot } from './source.ts';
6
- /** Business face of the attention indicator. */
7
- export interface AttentionIndicatorInjected {
8
- /** Panel snapshot of the Session; bound as `usePanel`. */
9
- readonly hooks: {
10
- readonly panel: HostObservable<PanelSnapshot>;
11
- };
12
- }
13
- /** Full props of the attention indicator. */
14
- export type AttentionIndicatorProps = PropsRuntime<'conversation.session.panel.indicator'> & InjectFace<AttentionIndicatorInjected> & PropsLocale<typeof NS>;
15
- /**
16
- * Render a yellow dot, named for assistive technology, while any bound change
17
- * request has failing checks, requested changes, or a merge conflict.
18
- * @param props - panel snapshot hook and copy.
19
- * @returns the indicator, or null while nothing needs attention.
20
- */
21
- export declare function AttentionIndicator({ usePanel, t }: AttentionIndicatorProps): ReactNode;
22
- //# sourceMappingURL=AttentionIndicator.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttentionIndicator.d.ts","sourceRoot":"","sources":["../../../src/client/AttentionIndicator.tsx"],"names":[],"mappings":"AAAA,uFAAuF;AAEvF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACtC,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAA;AAEpH,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AACtC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAIhD,gDAAgD;AAChD,MAAM,WAAW,0BAA0B;IACzC,0DAA0D;IAC1D,QAAQ,CAAC,KAAK,EAAE;QAAE,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,aAAa,CAAC,CAAA;KAAE,CAAA;CAClE;AAED,6CAA6C;AAC7C,MAAM,MAAM,uBAAuB,GACjC,YAAY,CAAC,sCAAsC,CAAC,GAClD,UAAU,CAAC,0BAA0B,CAAC,GACtC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAA;AAE1B;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,uBAAuB,GAAG,SAAS,CAQtF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"AttentionIndicator.js","sourceRoot":"","sources":["../../../src/client/AttentionIndicator.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,GAAG,MAAM,oBAAoB,CAAA;AAcpC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAE,QAAQ,EAAE,CAAC,EAA2B;IACzE,MAAM,SAAS,GAAG,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,IAAI,CAAC,cAAc,CAAC,KAAK,IAAI,CAAC,CAAA;IACpG,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAA;IAC3B,OAAO,CACL,eAAM,SAAS,EAAE,GAAG,CAAC,SAAS,0BAAuB,EAAE,YACrD,eAAM,SAAS,EAAE,GAAG,CAAC,cAAc,YAAG,CAAC,CAAC,kBAAkB,CAAC,GAAQ,GAC9D,CACR,CAAA;AACH,CAAC"}
@@ -1,37 +0,0 @@
1
- /** Mark over the Session panel toggle while a bound change request needs attention. */
2
-
3
- import type { ReactNode } from 'react'
4
- import type { HostObservable, InjectFace, PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots/client'
5
- import type {} from '@deepseek-ai/dsh-client-ui-session-panel/client'
6
- import type { NS } from './locales.ts'
7
- import type { PanelSnapshot } from './source.ts'
8
- import { needsAttention } from './status.ts'
9
- import css from './Forge.module.css'
10
-
11
- /** Business face of the attention indicator. */
12
- export interface AttentionIndicatorInjected {
13
- /** Panel snapshot of the Session; bound as `usePanel`. */
14
- readonly hooks: { readonly panel: HostObservable<PanelSnapshot> }
15
- }
16
-
17
- /** Full props of the attention indicator. */
18
- export type AttentionIndicatorProps =
19
- PropsRuntime<'conversation.session.panel.indicator'>
20
- & InjectFace<AttentionIndicatorInjected>
21
- & PropsLocale<typeof NS>
22
-
23
- /**
24
- * Render a yellow dot, named for assistive technology, while any bound change
25
- * request has failing checks, requested changes, or a merge conflict.
26
- * @param props - panel snapshot hook and copy.
27
- * @returns the indicator, or null while nothing needs attention.
28
- */
29
- export function AttentionIndicator({ usePanel, t }: AttentionIndicatorProps): ReactNode {
30
- const attention = usePanel(snapshot => snapshot.state?.changeRequests.some(needsAttention) === true)
31
- if (!attention) return null
32
- return (
33
- <span className={css.attention} data-forge-attention="">
34
- <span className={css.visuallyHidden}>{t('header.attention')}</span>
35
- </span>
36
- )
37
- }