mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
fix(tui): dedupe file references in prompt (#4775)
This commit is contained in:
parent
c33920f59d
commit
382758790c
1 changed files with 3 additions and 0 deletions
|
|
@ -150,9 +150,12 @@ export namespace SessionPrompt {
|
|||
},
|
||||
]
|
||||
const files = ConfigMarkdown.files(template)
|
||||
const seen = new Set<string>()
|
||||
await Promise.all(
|
||||
files.map(async (match) => {
|
||||
const name = match[1]
|
||||
if (seen.has(name)) return
|
||||
seen.add(name)
|
||||
const filepath = name.startsWith("~/")
|
||||
? path.join(os.homedir(), name.slice(2))
|
||||
: path.resolve(Instance.worktree, name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue