feat(panel): 内容工厂常驻、问问小埃大按钮、分词/朗读 Dialog
- 内容工厂固定高度常驻,面板尺寸/位置不再随拖拽变化 - 问问小埃改成与工厂项一致的大按钮,可点击/可 drop,drop 后新开对话并填入内容 - 工厂动作按内容过滤:无 CJK 不出分词,无链接不出提取,朗读仅文本 - 朗读打开语速 Dialog,分词改为可滑动选择的胶囊 + 复制 - BeginPortal 传面板矩形,供概览避让
This commit is contained in:
+16
@@ -89,16 +89,25 @@ bool App::init(bool daemon, bool forceShow, bool showTodo, bool showChat)
|
||||
}
|
||||
m_dragging = true;
|
||||
if (!m_model->isEmpty()) {
|
||||
if (m_panel && m_panel->isVisible()) {
|
||||
m_panel->suppressPortalIfUnderCursor();
|
||||
}
|
||||
return;
|
||||
}
|
||||
QTimer::singleShot(120, this, [this]() {
|
||||
if (m_dragging && m_model->isEmpty()) {
|
||||
showPanel();
|
||||
if (m_panel) {
|
||||
m_panel->suppressPortalIfUnderCursor();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
connect(portal, &PortalClient::dragEnded, this, [this]() {
|
||||
m_dragging = false;
|
||||
if (m_panel) {
|
||||
m_panel->stopPortalSuppression();
|
||||
}
|
||||
if (m_model->isEmpty() && m_panel && m_panel->isVisible()) {
|
||||
m_panel->dismiss();
|
||||
}
|
||||
@@ -131,6 +140,13 @@ void App::ensurePanel()
|
||||
|
||||
m_panel = new PortalPanel(m_model);
|
||||
connect(m_panel, &PortalPanel::openChatRequested, this, &App::showChatWindow);
|
||||
connect(m_panel, &PortalPanel::askWithContent, this,
|
||||
[this](const QString &text, const QStringList &files) {
|
||||
showChatWindow();
|
||||
if (m_chatWindow) {
|
||||
m_chatWindow->startConversationWith(text, files);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void App::showPanel()
|
||||
|
||||
Reference in New Issue
Block a user