import { THEME_CSS, escapeHtml, escapeAttr } from "../render/layout"; import { BUILD_ID } from "../build"; import type { CachedModel } from "../store"; export function buildIssueNew(owner: string, repo: string, writesEnabled: boolean, models: CachedModel[] = [], currentModel = ""): string { const listHref = `/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues`; const action = `/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/issues`; const modelSelect = models.length > 0 ? `` : ""; const body = writesEnabled ? `
${modelSelect}
取消
` : `
只读模式:创建工单未启用(WORK_WRITES_ENABLED=false)
`; return ` 新建工单 · ${escapeHtml(owner)}/${escapeHtml(repo)}
🏠 / ${escapeHtml(owner)}/${escapeHtml(repo)} 新建工单
${body}
${writesEnabled ? `` : ""} `; }