Merge branch 'dev' into llm-centralization
This commit is contained in:
commit
7c395e612e
6 changed files with 19 additions and 16 deletions
|
|
@ -8,7 +8,6 @@ import { Faq } from "~/component/faq"
|
||||||
import desktopAppIcon from "../../asset/lander/opencode-desktop-icon.png"
|
import desktopAppIcon from "../../asset/lander/opencode-desktop-icon.png"
|
||||||
import { Legal } from "~/component/legal"
|
import { Legal } from "~/component/legal"
|
||||||
import { config } from "~/config"
|
import { config } from "~/config"
|
||||||
import { github } from "~/lib/github"
|
|
||||||
|
|
||||||
function CopyStatus() {
|
function CopyStatus() {
|
||||||
return (
|
return (
|
||||||
|
|
@ -20,14 +19,7 @@ function CopyStatus() {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Download() {
|
export default function Download() {
|
||||||
const githubData = createAsync(() => github(), {
|
const downloadUrl = "https://github.com/sst/opencode/releases/latest/download"
|
||||||
deferStream: true,
|
|
||||||
})
|
|
||||||
const download = () => {
|
|
||||||
const version = githubData()?.release.tag_name
|
|
||||||
if (!version) return null
|
|
||||||
return `https://github.com/sst/opencode/releases/download/${version}`
|
|
||||||
}
|
|
||||||
const handleCopyClick = (command: string) => (event: Event) => {
|
const handleCopyClick = (command: string) => (event: Event) => {
|
||||||
const button = event.currentTarget as HTMLButtonElement
|
const button = event.currentTarget as HTMLButtonElement
|
||||||
navigator.clipboard.writeText(command)
|
navigator.clipboard.writeText(command)
|
||||||
|
|
@ -115,7 +107,7 @@ export default function Download() {
|
||||||
macOS (<span data-slot="hide-narrow">Apple </span>Silicon)
|
macOS (<span data-slot="hide-narrow">Apple </span>Silicon)
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<a href={download() + "/opencode-desktop-darwin-aarch64.dmg"} data-component="action-button">
|
<a href={downloadUrl + "/opencode-desktop-darwin-aarch64.dmg"} data-component="action-button">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -131,7 +123,7 @@ export default function Download() {
|
||||||
</span>
|
</span>
|
||||||
<span>macOS (Intel)</span>
|
<span>macOS (Intel)</span>
|
||||||
</div>
|
</div>
|
||||||
<a href={download() + "/opencode-desktop-darwin-x64.dmg"} data-component="action-button">
|
<a href={downloadUrl + "/opencode-desktop-darwin-x64.dmg"} data-component="action-button">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -154,7 +146,7 @@ export default function Download() {
|
||||||
</span>
|
</span>
|
||||||
<span>Windows (x64)</span>
|
<span>Windows (x64)</span>
|
||||||
</div>
|
</div>
|
||||||
<a href={download() + "/opencode-desktop-windows-x64.exe"} data-component="action-button">
|
<a href={downloadUrl + "/opencode-desktop-windows-x64.exe"} data-component="action-button">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -170,7 +162,7 @@ export default function Download() {
|
||||||
</span>
|
</span>
|
||||||
<span>Linux (.deb)</span>
|
<span>Linux (.deb)</span>
|
||||||
</div>
|
</div>
|
||||||
<a href={download() + "/opencode-desktop-linux-amd64.deb"} data-component="action-button">
|
<a href={downloadUrl + "/opencode-desktop-linux-amd64.deb"} data-component="action-button">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -186,7 +178,7 @@ export default function Download() {
|
||||||
</span>
|
</span>
|
||||||
<span>Linux (.rpm)</span>
|
<span>Linux (.rpm)</span>
|
||||||
</div>
|
</div>
|
||||||
<a href={download() + "/opencode-desktop-linux-x86_64.rpm"} data-component="action-button">
|
<a href={downloadUrl + "/opencode-desktop-linux-x86_64.rpm"} data-component="action-button">
|
||||||
Download
|
Download
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -783,6 +783,7 @@ export namespace Config {
|
||||||
.array(z.string())
|
.array(z.string())
|
||||||
.optional()
|
.optional()
|
||||||
.describe("Tools that should only be available to primary agents."),
|
.describe("Tools that should only be available to primary agents."),
|
||||||
|
continue_loop_on_deny: z.boolean().optional().describe("Continue the agent loop when a tool call is denied"),
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
})
|
})
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import { SessionStatus } from "./status"
|
||||||
import { Plugin } from "@/plugin"
|
import { Plugin } from "@/plugin"
|
||||||
import type { Provider } from "@/provider/provider"
|
import type { Provider } from "@/provider/provider"
|
||||||
import { LLM } from "./llm"
|
import { LLM } from "./llm"
|
||||||
|
import { Config } from "@/config/config"
|
||||||
|
|
||||||
export namespace SessionProcessor {
|
export namespace SessionProcessor {
|
||||||
const DOOM_LOOP_THRESHOLD = 3
|
const DOOM_LOOP_THRESHOLD = 3
|
||||||
|
|
@ -40,6 +41,7 @@ export namespace SessionProcessor {
|
||||||
},
|
},
|
||||||
async process(streamInput: LLM.StreamInput) {
|
async process(streamInput: LLM.StreamInput) {
|
||||||
log.info("process")
|
log.info("process")
|
||||||
|
const shouldBreak = (await Config.get()).experimental?.continue_loop_on_deny !== true
|
||||||
while (true) {
|
while (true) {
|
||||||
try {
|
try {
|
||||||
let currentText: MessageV2.TextPart | undefined
|
let currentText: MessageV2.TextPart | undefined
|
||||||
|
|
@ -219,7 +221,7 @@ export namespace SessionProcessor {
|
||||||
})
|
})
|
||||||
|
|
||||||
if (value.error instanceof Permission.RejectedError) {
|
if (value.error instanceof Permission.RejectedError) {
|
||||||
blocked = true
|
blocked = shouldBreak
|
||||||
}
|
}
|
||||||
delete toolcalls[value.toolCallId]
|
delete toolcalls[value.toolCallId]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1519,6 +1519,10 @@ export type Config = {
|
||||||
* Tools that should only be available to primary agents.
|
* Tools that should only be available to primary agents.
|
||||||
*/
|
*/
|
||||||
primary_tools?: Array<string>
|
primary_tools?: Array<string>
|
||||||
|
/**
|
||||||
|
* Continue the agent loop when a tool call is denied
|
||||||
|
*/
|
||||||
|
continue_loop_on_deny?: boolean
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8283,6 +8283,10 @@
|
||||||
"items": {
|
"items": {
|
||||||
"type": "string"
|
"type": "string"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"continue_loop_on_deny": {
|
||||||
|
"description": "Continue the agent loop when a tool call is denied",
|
||||||
|
"type": "boolean"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
"active": true,
|
"active": true,
|
||||||
"targets": ["deb", "rpm", "dmg", "nsis", "appimage"],
|
"targets": ["deb", "rpm", "dmg", "nsis"],
|
||||||
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
|
||||||
"externalBin": ["sidecars/opencode"],
|
"externalBin": ["sidecars/opencode"],
|
||||||
"createUpdaterArtifacts": true,
|
"createUpdaterArtifacts": true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue