优化: 子代理体验与纪律注入
- 工具纪律段抽共享同源注入 - 子代理轨迹浮层与完成卡身份 - 分离窗会话切换修复 - 960s 统一出口报告不再蒸发
This commit is contained in:
@@ -9,6 +9,8 @@
|
||||
@close="$emit('close')"
|
||||
header-style="display:none"
|
||||
>
|
||||
<!-- 关联会话跳转反馈(P3-7):命中已删会话时抽屉保持打开,toast 就地提示 -->
|
||||
<div v-if="toast.visible" class="drawer-toast" :class="'drawer-toast--' + toast.type">{{ toast.msg }}</div>
|
||||
<div class="task-drawer" v-if="task">
|
||||
<!-- 标题行:标题 + 状态 + 优先级 + 推进按钮 -->
|
||||
<div class="dr-header">
|
||||
@@ -205,7 +207,7 @@ const emit = defineEmits<{
|
||||
const { t } = useI18n()
|
||||
const router = useRouter()
|
||||
const store = useProjectStore()
|
||||
const { showToast } = useToast()
|
||||
const { toast, showToast } = useToast()
|
||||
const { openConversation } = useAiConversations()
|
||||
|
||||
// 关联会话引用(S4:审计表反查,无关联=空数组 → 入口隐藏)
|
||||
@@ -299,10 +301,15 @@ async function loadTaskConversations(tid: string) {
|
||||
} catch { taskConversations.value = [] }
|
||||
}
|
||||
|
||||
/** 点击关联会话:先关抽屉(面板在抽屉下层,不关会被遮挡),再走 openConversation 跳转 */
|
||||
/** 点击关联会话:跳转成功才关抽屉(面板在抽屉下层,不关会被遮挡);命中已删会话时留原地
|
||||
* 并 toast(UX走查 P3-7:原实现先关抽屉且静默兜底新建,用户落进空白对话无解释) */
|
||||
async function handleOpenConversation(convId: string) {
|
||||
const res = await openConversation(convId)
|
||||
if (res === 'not_found') {
|
||||
showToast(t('ai.convDeleted'), 'error')
|
||||
return
|
||||
}
|
||||
emit('close')
|
||||
await openConversation(convId)
|
||||
}
|
||||
|
||||
async function loadChildren() {
|
||||
@@ -402,4 +409,19 @@ async function confirmSubtask() {
|
||||
word-break: break-all;
|
||||
}
|
||||
.conv-link:hover { text-decoration: underline; }
|
||||
/* 抽屉内 toast(P3-7):fixed + 高 z-index 盖过 Arco Drawer 遮罩(内容被 teleport 到 body,作用域样式仍生效) */
|
||||
.drawer-toast {
|
||||
position: fixed;
|
||||
top: 16px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
padding: 8px 14px;
|
||||
border-radius: var(--df-radius);
|
||||
font-size: 12px;
|
||||
z-index: 3000;
|
||||
box-shadow: 0 4px 16px rgba(0,0,0,0.3);
|
||||
max-width: 80%;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.drawer-toast--error { background: var(--df-danger-bg); color: var(--df-danger); border: 0.5px solid var(--df-danger); }
|
||||
</style>
|
||||
Reference in New Issue
Block a user