kin: auto-commit after pipeline

This commit is contained in:
Gros Frumos 2026-03-17 20:54:20 +02:00
parent 9ea3ef1c18
commit 0a5f58b7fe
3 changed files with 38 additions and 1 deletions

View file

@ -256,6 +256,24 @@ async function toggleAutoTest() {
}
}
// Worktrees toggle
const worktrees = ref(false)
function loadWorktrees() {
worktrees.value = !!(project.value?.worktrees_enabled)
}
async function toggleWorktrees() {
worktrees.value = !worktrees.value
try {
await api.patchProject(props.id, { worktrees_enabled: worktrees.value })
if (project.value) project.value = { ...project.value, worktrees_enabled: worktrees.value ? 1 : 0 }
} catch (e: any) {
error.value = e.message
worktrees.value = !worktrees.value
}
}
// Audit
const auditLoading = ref(false)
const auditResult = ref<AuditResult | null>(null)
@ -483,6 +501,7 @@ async function load() {
loadMode()
loadAutocommit()
loadAutoTest()
loadWorktrees()
} catch (e: any) {
error.value = e.message
} finally {
@ -913,6 +932,14 @@ async function addDecision() {
:title="autoTest ? 'Auto-test: on — запускать тесты после pipeline' : 'Auto-test: off'">
{{ autoTest ? '&#x2713; Автотест' : 'Автотест' }}
</button>
<button @click="toggleWorktrees"
class="px-2 py-1 text-xs border rounded transition-colors"
:class="worktrees
? 'bg-teal-900/30 text-teal-400 border-teal-800 hover:bg-teal-900/50'
: 'bg-gray-800/50 text-gray-400 border-gray-700 hover:bg-gray-800'"
:title="worktrees ? 'Worktrees: on — агенты в изолированных git worktrees' : 'Worktrees: off'">
{{ worktrees ? '&#x2713; Worktrees' : 'Worktrees' }}
</button>
<button @click="runAudit" :disabled="auditLoading"
class="px-2 py-1 text-xs bg-purple-900/30 text-purple-400 border border-purple-800 rounded hover:bg-purple-900/50 disabled:opacity-50"
title="Check which pending tasks are already done">
@ -1227,6 +1254,14 @@ async function addDecision() {
:title="autoTest ? 'Auto-test: on — запускать тесты после pipeline' : 'Auto-test: off'">
{{ autoTest ? '&#x2713; Автотест' : 'Автотест' }}
</button>
<button @click="toggleWorktrees"
class="px-2 py-1 text-xs border rounded transition-colors"
:class="worktrees
? 'bg-teal-900/30 text-teal-400 border-teal-800 hover:bg-teal-900/50'
: 'bg-gray-800/50 text-gray-400 border-gray-700 hover:bg-gray-800'"
:title="worktrees ? 'Worktrees: on — агенты в изолированных git worktrees' : 'Worktrees: off'">
{{ worktrees ? '&#x2713; Worktrees' : 'Worktrees' }}
</button>
<button @click="runAudit" :disabled="auditLoading"
class="px-2 py-1 text-xs bg-purple-900/30 text-purple-400 border border-purple-800 rounded hover:bg-purple-900/50 disabled:opacity-50"
title="Check which pending tasks are already done">