Merge remote-tracking branch 'origin/master' into refactor/llm-route-credential
This commit is contained in:
commit
a1c0299977
256 files changed
+10159
-8527
No files matched your search
@@ -24,8 +24,8 @@
|
||||
en: 74255d6005e1c9e8
|
||||
zh: 252d0d552f1e26a1
|
||||
/forges/panel:
|
||||
en: 7dcefe2825490257
|
||||
zh: 38cec4d1ae3b0d6e
|
||||
en: 0fc2e5a367d0a3ad
|
||||
zh: a1028e4ecf61b70c
|
||||
/forges/extension-api:
|
||||
en: f35345e482e84f4f
|
||||
zh: 2ecb7d9498decb31
|
||||
@@ -1121,7 +1121,7 @@ type ForgeChangeRequestStatesFrame =
|
||||
| { readonly type: 'changed'; readonly states: readonly ForgeChangeRequestListState[] }
|
||||
```
|
||||
|
||||
The changes view reads through the same Remote. `localDiff` reads one `ForgeLocalScope` of the Session's checkout, and `changeRequestDiff` reads a bound change request at the head of its latest status through the provider's `diff`, which returns a patch only for that head commit, or the `ForgeCommitRange` it names through the provider's `compare`; both return files that the Host parsed into `ForgeDiffFile` hunks, each with its review layer and change digest. `localCommits` and `changeRequestCommits` list the commits a range can name, the latter as null when the provider does not read commits. `localText` and `changeRequestText` read the new side of one file, which supplies the unchanged lines between hunks. Each inspection also sizes the `branch` scope as `ForgePanelState.local` for the panel's local changes card, always against the automatic fork point. A `branch` scope whose `base` names a ref compares with the merge base of HEAD and that branch instead; `diffBases` lists the branches the view offers, with the automatic fork point. When the head moved past the latest status, the provider returns `stale` and `ctx.forge.diff` polls the change request at once, once per head commit; `changeRequestDiff` rejects with `forgePanel/stale-head` and caches nothing, and the changes view keeps loading until a later status arrives, then reads again at that status's head. Review comments therefore always address the commit whose lines the view shows.
|
||||
The changes view reads through the same Remote. `localDiff` reads one `ForgeLocalScope` of the Session's checkout, and `changeRequestDiff` reads a bound change request at the head of its latest status through the provider's `diff`, which returns a patch only for that head commit, or the `ForgeCommitRange` it names through the provider's `compare`; both return files that the Host parsed into `ForgeDiffFile` hunks, each with its review layer and change digest. `localCommits` and `changeRequestCommits` list the commits a range can name, the latter as null when the provider does not read commits. `localText` and `changeRequestText` read the new side of one file, which supplies the unchanged lines between hunks. Each inspection also sizes the `branch` scope as `ForgePanelState.local` for the Session panel's local changes row, always against the automatic fork point. A `branch` scope whose `base` names a ref compares with the merge base of HEAD and that branch instead; `diffBases` lists the branches the view offers, with the automatic fork point. When the head moved past the latest status, the provider returns `stale` and `ctx.forge.diff` polls the change request at once, once per head commit; `changeRequestDiff` rejects with `forgePanel/stale-head` and caches nothing, and the changes view keeps loading until a later status arrives, then reads again at that status's head. Review comments therefore always address the commit whose lines the view shows.
|
||||
|
||||
`changeRequestReview(session, url, headSha, fresh)` reads the threads of a bound change request at the head of the diff the view shows and refuses another head with `forgePanel/stale-head`, `forgePanel/review-unsupported` for a provider without review reads, and `forgePanel/review-failed` otherwise. It keeps one read per change request in memory, keyed by head commit and the status's update time and bounded by `maxCachedReviewBytes`, and reads again once the kept read is `reviewRefreshMs` old or when `fresh` asks for it, as the first read after the reader refreshes the view does: on GitHub a new comment or reply changes a pull request's update time, but resolving a thread does not. The changes view asks again at every status it receives while visible, and overlays the threads on the files the [panel README](../../packages/experimental/client-ui-forge/README.md#use-this-package) describes.
|
||||
|
||||
@@ -1309,7 +1309,7 @@ interface ForgeChangedFile {
|
||||
```
|
||||
|
||||
```ts type-equiv
|
||||
/** Size of the `branch` scope, which the panel's local changes card shows. */
|
||||
/** Size of the `branch` scope, which the Session panel's local changes row shows. */
|
||||
interface ForgeLocalChanges {
|
||||
/** Ref or abbreviated commit the scope compares with. */
|
||||
readonly base: string
|
||||
|
||||
@@ -1123,7 +1123,7 @@ type ForgeChangeRequestStatesFrame =
|
||||
| { readonly type: 'changed'; readonly states: readonly ForgeChangeRequestListState[] }
|
||||
```
|
||||
|
||||
变更视图经同一个 Remote 读取。`localDiff` 读取 Session 检出的某个 `ForgeLocalScope`;`changeRequestDiff` 经提供方的 `diff` 读取已绑定变更请求在其最新状态 head 处的变更(提供方只返回描述该 head 提交的补丁),或经提供方的 `compare` 读取它指定的 `ForgeCommitRange`;两者返回的文件都已在宿主上解析为 `ForgeDiffFile` 的 hunk,并带有分层与改动摘要。`localCommits` 与 `changeRequestCommits` 列出范围可以指定的提交,提供方不读取提交时后者返回 null。`localText` 与 `changeRequestText` 读取一个文件的新版本,用来补出 hunk 之间未变更的行。每次检查还会把 `branch` 范围的规模统计为 `ForgePanelState.local`,供面板的变更卡片使用,始终以自动分叉点为准。`base` 指定了引用的 `branch` 范围改为与 HEAD 和该分支的合并基准比较;`diffBases` 列出视图可选的分支以及自动分叉点。head 已越过最新状态时,提供方返回 `stale`,`ctx.forge.diff` 立即重新轮询该变更请求(每个 head 提交一次);`changeRequestDiff` 以 `forgePanel/stale-head` 拒绝且不缓存任何内容,变更视图保持加载,直到更新的状态到达后按该状态的 head 重新读取。因此评审评论始终指向视图所显示行的那个提交。
|
||||
变更视图经同一个 Remote 读取。`localDiff` 读取 Session 检出的某个 `ForgeLocalScope`;`changeRequestDiff` 经提供方的 `diff` 读取已绑定变更请求在其最新状态 head 处的变更(提供方只返回描述该 head 提交的补丁),或经提供方的 `compare` 读取它指定的 `ForgeCommitRange`;两者返回的文件都已在宿主上解析为 `ForgeDiffFile` 的 hunk,并带有分层与改动摘要。`localCommits` 与 `changeRequestCommits` 列出范围可以指定的提交,提供方不读取提交时后者返回 null。`localText` 与 `changeRequestText` 读取一个文件的新版本,用来补出 hunk 之间未变更的行。每次检查还会把 `branch` 范围的规模统计为 `ForgePanelState.local`,供会话面板的本地变更行使用,始终以自动分叉点为准。`base` 指定了引用的 `branch` 范围改为与 HEAD 和该分支的合并基准比较;`diffBases` 列出视图可选的分支以及自动分叉点。head 已越过最新状态时,提供方返回 `stale`,`ctx.forge.diff` 立即重新轮询该变更请求(每个 head 提交一次);`changeRequestDiff` 以 `forgePanel/stale-head` 拒绝且不缓存任何内容,变更视图保持加载,直到更新的状态到达后按该状态的 head 重新读取。因此评审评论始终指向视图所显示行的那个提交。
|
||||
|
||||
`changeRequestReview(session, url, headSha, fresh)` 在视图所显示 diff 的 head 处读取已绑定变更请求的讨论;head 不同时以 `forgePanel/stale-head` 拒绝,提供方不支持读取讨论时返回 `forgePanel/review-unsupported`,其他失败返回 `forgePanel/review-failed`。每个变更请求在内存里保留一次读取结果,以 head 提交和状态的更新时间为键、受 `maxCachedReviewBytes` 约束,保留时间达到 `reviewRefreshMs` 后,或 `fresh` 要求时(读者刷新视图后的第一次读取就是这样)重新读取:在 GitHub 上,新评论和回复会改变 PR 的更新时间,解决讨论则不会。变更视图可见时,每收到一次状态就重新请求一次,并按[面板 README](../../packages/experimental/client-ui-forge/README.zh.md#use-this-package) 所述把讨论叠加到文件上。
|
||||
|
||||
@@ -1311,7 +1311,7 @@ interface ForgeChangedFile {
|
||||
```
|
||||
|
||||
```ts type-equiv
|
||||
/** Size of the `branch` scope, which the panel's local changes card shows. */
|
||||
/** Size of the `branch` scope, which the Session panel's local changes row shows. */
|
||||
interface ForgeLocalChanges {
|
||||
/** Ref or abbreviated commit the scope compares with. */
|
||||
readonly base: string
|
||||
|
||||
@@ -181,6 +181,12 @@ interface JobOutcome {
|
||||
* reason, the registry appends that reason.
|
||||
*/
|
||||
detail?: string
|
||||
/**
|
||||
* Exit code of the process the job ran, for a producer that runs one. A
|
||||
* nonzero code on a `completed` job means the command reported failure while
|
||||
* the job itself finished.
|
||||
*/
|
||||
exitCode?: number
|
||||
/**
|
||||
* Return value for jobs whose result is a value rather than a stream (a
|
||||
* workflow's rendered result, a subagent's report). The output ring carries
|
||||
@@ -295,6 +301,8 @@ interface JobView {
|
||||
readonly progress?: string
|
||||
/** Terminal reason (`exit code: 3`); a recorded kill reason is merged in. */
|
||||
readonly detail?: string
|
||||
/** Exit code of the process the job ran, once settled, for a producer that reports one. */
|
||||
readonly exitCode?: number
|
||||
/** Epoch ms when the job was registered. */
|
||||
readonly startedAt: number
|
||||
/** Epoch ms when the job settled; absent while live. */
|
||||
|
||||
@@ -181,6 +181,12 @@ interface JobOutcome {
|
||||
* reason, the registry appends that reason.
|
||||
*/
|
||||
detail?: string
|
||||
/**
|
||||
* Exit code of the process the job ran, for a producer that runs one. A
|
||||
* nonzero code on a `completed` job means the command reported failure while
|
||||
* the job itself finished.
|
||||
*/
|
||||
exitCode?: number
|
||||
/**
|
||||
* Return value for jobs whose result is a value rather than a stream (a
|
||||
* workflow's rendered result, a subagent's report). The output ring carries
|
||||
@@ -295,6 +301,8 @@ interface JobView {
|
||||
readonly progress?: string
|
||||
/** Terminal reason (`exit code: 3`); a recorded kill reason is merged in. */
|
||||
readonly detail?: string
|
||||
/** Exit code of the process the job ran, once settled, for a producer that reports one. */
|
||||
readonly exitCode?: number
|
||||
/** Epoch ms when the job was registered. */
|
||||
readonly startedAt: number
|
||||
/** Epoch ms when the job settled; absent while live. */
|
||||
|
||||
Reference in new issue
Block a user