mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-17 12:42:17 +00:00
chore: generate
This commit is contained in:
parent
4bae84c8b0
commit
19fce2bc6f
2 changed files with 9 additions and 3 deletions
|
|
@ -131,8 +131,12 @@ function referenceTextPart(input: {
|
|||
const metadata: ReferencePromptMetadata = {
|
||||
name: input.reference.name,
|
||||
kind: input.reference.kind,
|
||||
...(input.reference.kind === "invalid" ? { repository: input.reference.repository } : { path: input.reference.path }),
|
||||
...(input.reference.kind === "git" ? { repository: input.reference.repository, branch: input.reference.branch } : {}),
|
||||
...(input.reference.kind === "invalid"
|
||||
? { repository: input.reference.repository }
|
||||
: { path: input.reference.path }),
|
||||
...(input.reference.kind === "git"
|
||||
? { repository: input.reference.repository, branch: input.reference.branch }
|
||||
: {}),
|
||||
...(input.target === undefined ? {} : { target: input.target }),
|
||||
...(input.targetPath ? { targetPath: input.targetPath } : {}),
|
||||
problem: input.problem ?? (input.reference.kind === "invalid" ? input.reference.message : undefined),
|
||||
|
|
|
|||
|
|
@ -1925,7 +1925,9 @@ it.live("injects metadata for configured reference file attachments", () =>
|
|||
const synthetic = stored.parts.filter(
|
||||
(part): part is MessageV2.TextPart => part.type === "text" && part.synthetic === true,
|
||||
)
|
||||
const reference = synthetic.find((part) => part.text.startsWith("Referenced configured reference @docs/README.md."))
|
||||
const reference = synthetic.find((part) =>
|
||||
part.text.startsWith("Referenced configured reference @docs/README.md."),
|
||||
)
|
||||
|
||||
expect(reference?.metadata?.reference).toMatchObject({
|
||||
name: "docs",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue