mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
tweak: make /export go to cwd
This commit is contained in:
parent
bfefdb3752
commit
97893bd7e6
2 changed files with 2 additions and 4 deletions
|
|
@ -583,9 +583,8 @@ export function Session() {
|
|||
transcript += `---\n\n`
|
||||
}
|
||||
|
||||
// Save to file in data directory
|
||||
const exportDir = path.join(Global.Path.data, "exports")
|
||||
await fs.mkdir(exportDir, { recursive: true })
|
||||
// Save to file in current working directory
|
||||
const exportDir = process.cwd()
|
||||
|
||||
const timestamp = new Date().toISOString().replace(/[:.]/g, "-")
|
||||
const filename = `session-${sessionData.id.slice(0, 8)}-${timestamp}.md`
|
||||
|
|
|
|||
|
|
@ -24,7 +24,6 @@ export namespace ProviderTransform {
|
|||
const result: ModelMessage[] = []
|
||||
for (let i = 0; i < msgs.length; i++) {
|
||||
const msg = msgs[i]
|
||||
const prevMsg = msgs[i - 1]
|
||||
const nextMsg = msgs[i + 1]
|
||||
|
||||
if ((msg.role === "assistant" || msg.role === "tool") && Array.isArray(msg.content)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue