tweak: update import & pr commands to use new share link ur

This commit is contained in:
Aiden Cline
2025-12-23 14:04:33 -06:00
parent 698cfb57a1
commit e30d5d8e34
2 changed files with 4 additions and 4 deletions

View File

@@ -31,15 +31,15 @@ export const ImportCommand = cmd({
const isUrl = args.file.startsWith("http://") || args.file.startsWith("https://")
if (isUrl) {
const urlMatch = args.file.match(/https?:\/\/opencode\.ai\/s\/([a-zA-Z0-9_-]+)/)
const urlMatch = args.file.match(/https?:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/)
if (!urlMatch) {
process.stdout.write(`Invalid URL format. Expected: https://opencode.ai/s/<slug>`)
process.stdout.write(`Invalid URL format. Expected: https://opncd.ai/s/<slug>`)
process.stdout.write(EOL)
return
}
const slug = urlMatch[1]
const response = await fetch(`https://api.opencode.ai/share_data?id=${slug}`)
const response = await fetch(`https://opncd.ai/api/share/${slug}`)
if (!response.ok) {
process.stdout.write(`Failed to fetch share data: ${response.statusText}`)

View File

@@ -65,7 +65,7 @@ export const PrCommand = cmd({
// Check for opencode session link in PR body
if (prInfo && prInfo.body) {
const sessionMatch = prInfo.body.match(/https:\/\/opencode\.ai\/s\/([a-zA-Z0-9_-]+)/)
const sessionMatch = prInfo.body.match(/https:\/\/opncd\.ai\/s\/([a-zA-Z0-9_-]+)/)
if (sessionMatch) {
const sessionUrl = sessionMatch[0]
UI.println(`Found opencode session: ${sessionUrl}`)