You've already forked agentic-coding-workflow
ESLint fix
This commit is contained in:
@@ -299,7 +299,9 @@ watch(() => props.clientType, loadForm)
|
|||||||
<template>
|
<template>
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div>
|
<div>
|
||||||
<h2 class="text-lg font-semibold">客户端配置文件</h2>
|
<h2 class="text-lg font-semibold">
|
||||||
|
客户端配置文件
|
||||||
|
</h2>
|
||||||
<p class="text-xs text-gray-500 mt-1">
|
<p class="text-xs text-gray-500 mt-1">
|
||||||
配置存数据库,session 启动前物化到受管目录并通过
|
配置存数据库,session 启动前物化到受管目录并通过
|
||||||
<code v-if="clientType === 'claude_code'">CLAUDE_CONFIG_DIR</code>
|
<code v-if="clientType === 'claude_code'">CLAUDE_CONFIG_DIR</code>
|
||||||
@@ -409,7 +411,9 @@ watch(() => props.clientType, loadForm)
|
|||||||
|
|
||||||
<!-- 高级模式:文件列表 + 原始编辑 -->
|
<!-- 高级模式:文件列表 + 原始编辑 -->
|
||||||
<div class="border rounded p-4 space-y-3 mt-4">
|
<div class="border rounded p-4 space-y-3 mt-4">
|
||||||
<div class="text-sm font-medium">全部配置文件(高级模式)</div>
|
<div class="text-sm font-medium">
|
||||||
|
全部配置文件(高级模式)
|
||||||
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="files.length === 0"
|
v-if="files.length === 0"
|
||||||
class="text-sm text-gray-500"
|
class="text-sm text-gray-500"
|
||||||
|
|||||||
@@ -74,22 +74,38 @@ function fsWriteSize(): number {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="py-1">
|
<div class="py-1">
|
||||||
<div v-if="eventType === 'user_prompt'" class="flex gap-2">
|
<div
|
||||||
|
v-if="eventType === 'user_prompt'"
|
||||||
|
class="flex gap-2"
|
||||||
|
>
|
||||||
<span class="text-xs text-gray-500 mt-0.5 w-12">user</span>
|
<span class="text-xs text-gray-500 mt-0.5 w-12">user</span>
|
||||||
<div class="flex-1 px-2 py-1 bg-blue-50 rounded text-sm">{{ userPromptText() }}</div>
|
<div class="flex-1 px-2 py-1 bg-blue-50 rounded text-sm">
|
||||||
|
{{ userPromptText() }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'user_cancel'" class="flex gap-2 text-xs text-gray-500">
|
<div
|
||||||
|
v-else-if="eventType === 'user_cancel'"
|
||||||
|
class="flex gap-2 text-xs text-gray-500"
|
||||||
|
>
|
||||||
<span class="w-12">user</span>
|
<span class="w-12">user</span>
|
||||||
<span>· cancel</span>
|
<span>· cancel</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'agent_text'" class="flex gap-2">
|
<div
|
||||||
|
v-else-if="eventType === 'agent_text'"
|
||||||
|
class="flex gap-2"
|
||||||
|
>
|
||||||
<span class="text-xs text-gray-500 mt-0.5 w-12">agent</span>
|
<span class="text-xs text-gray-500 mt-0.5 w-12">agent</span>
|
||||||
<div class="flex-1 text-sm whitespace-pre-wrap">{{ chunkText() }}</div>
|
<div class="flex-1 text-sm whitespace-pre-wrap">
|
||||||
|
{{ chunkText() }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'agent_thought'" class="flex gap-2">
|
<div
|
||||||
|
v-else-if="eventType === 'agent_thought'"
|
||||||
|
class="flex gap-2"
|
||||||
|
>
|
||||||
<span class="text-xs text-gray-500 mt-0.5 w-12">thought</span>
|
<span class="text-xs text-gray-500 mt-0.5 w-12">thought</span>
|
||||||
<div class="flex-1">
|
<div class="flex-1">
|
||||||
<button
|
<button
|
||||||
@@ -107,21 +123,30 @@ function fsWriteSize(): number {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'tool_fs_read'" class="flex gap-2 text-sm">
|
<div
|
||||||
|
v-else-if="eventType === 'tool_fs_read'"
|
||||||
|
class="flex gap-2 text-sm"
|
||||||
|
>
|
||||||
<span class="text-xs text-gray-500 mt-0.5 w-12">tool</span>
|
<span class="text-xs text-gray-500 mt-0.5 w-12">tool</span>
|
||||||
<div class="flex-1 px-2 py-0.5 bg-yellow-50 rounded">
|
<div class="flex-1 px-2 py-0.5 bg-yellow-50 rounded">
|
||||||
read <code class="text-xs">{{ fsPath() }}</code>
|
read <code class="text-xs">{{ fsPath() }}</code>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'tool_fs_write'" class="flex gap-2 text-sm">
|
<div
|
||||||
|
v-else-if="eventType === 'tool_fs_write'"
|
||||||
|
class="flex gap-2 text-sm"
|
||||||
|
>
|
||||||
<span class="text-xs text-gray-500 mt-0.5 w-12">tool</span>
|
<span class="text-xs text-gray-500 mt-0.5 w-12">tool</span>
|
||||||
<div class="flex-1 px-2 py-0.5 bg-orange-50 rounded">
|
<div class="flex-1 px-2 py-0.5 bg-orange-50 rounded">
|
||||||
write <code class="text-xs">{{ fsPath() }}</code> ({{ fsWriteSize() }} bytes)
|
write <code class="text-xs">{{ fsPath() }}</code> ({{ fsWriteSize() }} bytes)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'tool_permission'" class="flex gap-2 text-sm">
|
<div
|
||||||
|
v-else-if="eventType === 'tool_permission'"
|
||||||
|
class="flex gap-2 text-sm"
|
||||||
|
>
|
||||||
<span class="text-xs text-gray-500 mt-0.5 w-12">perm</span>
|
<span class="text-xs text-gray-500 mt-0.5 w-12">perm</span>
|
||||||
<div class="flex-1 px-2 py-0.5 bg-purple-50 rounded">
|
<div class="flex-1 px-2 py-0.5 bg-purple-50 rounded">
|
||||||
permission requested (auto-rejected)
|
permission requested (auto-rejected)
|
||||||
@@ -135,12 +160,20 @@ function fsWriteSize(): number {
|
|||||||
session terminated
|
session terminated
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else-if="eventType === 'client_error'" class="flex gap-2 text-sm text-red-600">
|
<div
|
||||||
|
v-else-if="eventType === 'client_error'"
|
||||||
|
class="flex gap-2 text-sm text-red-600"
|
||||||
|
>
|
||||||
<span class="text-xs mt-0.5 w-12">error</span>
|
<span class="text-xs mt-0.5 w-12">error</span>
|
||||||
<div class="flex-1">{{ (payload as { message?: string }).message }}</div>
|
<div class="flex-1">
|
||||||
|
{{ (payload as { message?: string }).message }}
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-else class="flex gap-2 text-xs text-gray-400">
|
<div
|
||||||
|
v-else
|
||||||
|
class="flex gap-2 text-xs text-gray-400"
|
||||||
|
>
|
||||||
<span class="w-12">{{ eventType }}</span>
|
<span class="w-12">{{ eventType }}</span>
|
||||||
<code class="flex-1 truncate">{{ event.method }}</code>
|
<code class="flex-1 truncate">{{ event.method }}</code>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -35,7 +35,10 @@ function onKeydown(ev: KeyboardEvent) {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<form class="flex gap-2 items-end" @submit.prevent="submit">
|
<form
|
||||||
|
class="flex gap-2 items-end"
|
||||||
|
@submit.prevent="submit"
|
||||||
|
>
|
||||||
<textarea
|
<textarea
|
||||||
v-model="text"
|
v-model="text"
|
||||||
class="flex-1 resize-none border rounded px-2 py-1 text-sm"
|
class="flex-1 resize-none border rounded px-2 py-1 text-sm"
|
||||||
|
|||||||
@@ -25,31 +25,69 @@ async function terminate(id: string) {
|
|||||||
<AppShell>
|
<AppShell>
|
||||||
<div class="space-y-4">
|
<div class="space-y-4">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<h2 class="text-lg font-semibold">ACP 会话管理</h2>
|
<h2 class="text-lg font-semibold">
|
||||||
|
ACP 会话管理
|
||||||
|
</h2>
|
||||||
<span class="text-sm text-gray-500">全局管理员视图(所有用户)</span>
|
<span class="text-sm text-gray-500">全局管理员视图(所有用户)</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="store.loading" class="text-gray-500">Loading...</div>
|
<div
|
||||||
<div v-else-if="store.error" class="text-red-600">{{ store.error }}</div>
|
v-if="store.loading"
|
||||||
<div v-else-if="store.sessions.length === 0" class="text-gray-500">
|
class="text-gray-500"
|
||||||
|
>
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="store.error"
|
||||||
|
class="text-red-600"
|
||||||
|
>
|
||||||
|
{{ store.error }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="store.sessions.length === 0"
|
||||||
|
class="text-gray-500"
|
||||||
|
>
|
||||||
No sessions.
|
No sessions.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table v-else class="w-full text-sm">
|
<table
|
||||||
|
v-else
|
||||||
|
class="w-full text-sm"
|
||||||
|
>
|
||||||
<thead class="text-left">
|
<thead class="text-left">
|
||||||
<tr class="border-b">
|
<tr class="border-b">
|
||||||
<th class="px-3 py-2">User</th>
|
<th class="px-3 py-2">
|
||||||
<th class="px-3 py-2">Branch</th>
|
User
|
||||||
<th class="px-3 py-2">Status</th>
|
</th>
|
||||||
<th class="px-3 py-2">Started</th>
|
<th class="px-3 py-2">
|
||||||
<th class="px-3 py-2 text-right">Actions</th>
|
Branch
|
||||||
|
</th>
|
||||||
|
<th class="px-3 py-2">
|
||||||
|
Status
|
||||||
|
</th>
|
||||||
|
<th class="px-3 py-2">
|
||||||
|
Started
|
||||||
|
</th>
|
||||||
|
<th class="px-3 py-2 text-right">
|
||||||
|
Actions
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="s in store.sessions" :key="s.id" class="border-t hover:bg-gray-50">
|
<tr
|
||||||
<td class="px-3 py-2 font-mono text-xs">{{ s.user_id }}</td>
|
v-for="s in store.sessions"
|
||||||
<td class="px-3 py-2 font-mono text-xs">{{ s.branch }}</td>
|
:key="s.id"
|
||||||
<td class="px-3 py-2"><SessionStatusBadge :status="s.status" /></td>
|
class="border-t hover:bg-gray-50"
|
||||||
|
>
|
||||||
|
<td class="px-3 py-2 font-mono text-xs">
|
||||||
|
{{ s.user_id }}
|
||||||
|
</td>
|
||||||
|
<td class="px-3 py-2 font-mono text-xs">
|
||||||
|
{{ s.branch }}
|
||||||
|
</td>
|
||||||
|
<td class="px-3 py-2">
|
||||||
|
<SessionStatusBadge :status="s.status" />
|
||||||
|
</td>
|
||||||
<td class="px-3 py-2 text-xs text-gray-500">
|
<td class="px-3 py-2 text-xs text-gray-500">
|
||||||
{{ new Date(s.started_at).toLocaleString() }}
|
{{ new Date(s.started_at).toLocaleString() }}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -176,12 +176,18 @@ async function openCommit() {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p v-if="errorMsg" class="px-4 py-2 text-sm text-red-600 bg-red-50">
|
<p
|
||||||
|
v-if="errorMsg"
|
||||||
|
class="px-4 py-2 text-sm text-red-600 bg-red-50"
|
||||||
|
>
|
||||||
{{ errorMsg }}
|
{{ errorMsg }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- WS client_error 帧提示 -->
|
<!-- WS client_error 帧提示 -->
|
||||||
<p v-if="streamError" class="px-4 py-2 text-sm text-red-700 bg-red-100">
|
<p
|
||||||
|
v-if="streamError"
|
||||||
|
class="px-4 py-2 text-sm text-red-700 bg-red-100"
|
||||||
|
>
|
||||||
连接错误:{{ streamError }}
|
连接错误:{{ streamError }}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,9 @@ async function terminate(id: string) {
|
|||||||
<template>
|
<template>
|
||||||
<div class="p-6 space-y-4">
|
<div class="p-6 space-y-4">
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex items-center justify-between">
|
||||||
<h1 class="text-2xl font-semibold">ACP Sessions</h1>
|
<h1 class="text-2xl font-semibold">
|
||||||
|
ACP Sessions
|
||||||
|
</h1>
|
||||||
<button
|
<button
|
||||||
class="px-3 py-1 rounded text-sm font-medium bg-blue-600 text-white hover:bg-blue-700"
|
class="px-3 py-1 rounded text-sm font-medium bg-blue-600 text-white hover:bg-blue-700"
|
||||||
@click="newSession"
|
@click="newSession"
|
||||||
@@ -46,25 +48,57 @@ async function terminate(id: string) {
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="store.loading" class="text-gray-500">Loading...</div>
|
<div
|
||||||
<div v-else-if="store.error" class="text-red-600">{{ store.error }}</div>
|
v-if="store.loading"
|
||||||
<div v-else-if="store.sessions.length === 0" class="text-gray-500">
|
class="text-gray-500"
|
||||||
|
>
|
||||||
|
Loading...
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="store.error"
|
||||||
|
class="text-red-600"
|
||||||
|
>
|
||||||
|
{{ store.error }}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-else-if="store.sessions.length === 0"
|
||||||
|
class="text-gray-500"
|
||||||
|
>
|
||||||
No sessions yet. Click "+ New" to create one.
|
No sessions yet. Click "+ New" to create one.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<table v-else class="w-full text-sm">
|
<table
|
||||||
|
v-else
|
||||||
|
class="w-full text-sm"
|
||||||
|
>
|
||||||
<thead class="text-left">
|
<thead class="text-left">
|
||||||
<tr class="border-b">
|
<tr class="border-b">
|
||||||
<th class="px-3 py-2">Branch</th>
|
<th class="px-3 py-2">
|
||||||
<th class="px-3 py-2">Status</th>
|
Branch
|
||||||
<th class="px-3 py-2">Started</th>
|
</th>
|
||||||
<th class="px-3 py-2 text-right">Actions</th>
|
<th class="px-3 py-2">
|
||||||
|
Status
|
||||||
|
</th>
|
||||||
|
<th class="px-3 py-2">
|
||||||
|
Started
|
||||||
|
</th>
|
||||||
|
<th class="px-3 py-2 text-right">
|
||||||
|
Actions
|
||||||
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="s in store.sessions" :key="s.id" class="border-t hover:bg-gray-50">
|
<tr
|
||||||
<td class="px-3 py-2 font-mono text-xs">{{ s.branch }}</td>
|
v-for="s in store.sessions"
|
||||||
<td class="px-3 py-2"><SessionStatusBadge :status="s.status" /></td>
|
:key="s.id"
|
||||||
|
class="border-t hover:bg-gray-50"
|
||||||
|
>
|
||||||
|
<td class="px-3 py-2 font-mono text-xs">
|
||||||
|
{{ s.branch }}
|
||||||
|
</td>
|
||||||
|
<td class="px-3 py-2">
|
||||||
|
<SessionStatusBadge :status="s.status" />
|
||||||
|
</td>
|
||||||
<td class="px-3 py-2 text-xs text-gray-500">
|
<td class="px-3 py-2 text-xs text-gray-500">
|
||||||
{{ new Date(s.started_at).toLocaleString() }}
|
{{ new Date(s.started_at).toLocaleString() }}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
@@ -75,7 +75,10 @@
|
|||||||
@positive-click="deleteCurrentConversation"
|
@positive-click="deleteCurrentConversation"
|
||||||
>
|
>
|
||||||
<template #trigger>
|
<template #trigger>
|
||||||
<NButton text size="small">
|
<NButton
|
||||||
|
text
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
<template #icon>
|
<template #icon>
|
||||||
<NIcon><TrashOutline /></NIcon>
|
<NIcon><TrashOutline /></NIcon>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -93,7 +93,9 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span class="font-medium">AI 对话</span>
|
<span class="font-medium">AI 对话</span>
|
||||||
<NTag size="tiny">{{ conversations.length }}</NTag>
|
<NTag size="tiny">
|
||||||
|
{{ conversations.length }}
|
||||||
|
</NTag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -140,7 +142,9 @@
|
|||||||
<template #header>
|
<template #header>
|
||||||
<div class="flex items-center gap-2">
|
<div class="flex items-center gap-2">
|
||||||
<span class="font-medium">ACP 会话</span>
|
<span class="font-medium">ACP 会话</span>
|
||||||
<NTag size="tiny">{{ acpSessions.length }}</NTag>
|
<NTag size="tiny">
|
||||||
|
{{ acpSessions.length }}
|
||||||
|
</NTag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user