feat(panel): 内容工厂常驻、问问小埃大按钮、分词/朗读 Dialog
- 内容工厂固定高度常驻,面板尺寸/位置不再随拖拽变化 - 问问小埃改成与工厂项一致的大按钮,可点击/可 drop,drop 后新开对话并填入内容 - 工厂动作按内容过滤:无 CJK 不出分词,无链接不出提取,朗读仅文本 - 朗读打开语速 Dialog,分词改为可滑动选择的胶囊 + 复制 - BeginPortal 传面板矩形,供概览避让
This commit is contained in:
@@ -1256,6 +1256,36 @@ void ChatWindow::handleDropOnConversation(int index, const QMimeData *mime)
|
||||
activateWindow();
|
||||
}
|
||||
|
||||
void ChatWindow::startConversationWith(const QString &text, const QStringList &files)
|
||||
{
|
||||
activateForAsk();
|
||||
newConversation();
|
||||
|
||||
QString content = text;
|
||||
if (!files.isEmpty()) {
|
||||
if (!content.isEmpty()) {
|
||||
content += QLatin1Char('\n');
|
||||
}
|
||||
content += files.join(QLatin1Char('\n'));
|
||||
}
|
||||
if (!content.isEmpty()) {
|
||||
m_input->setPlainText(content);
|
||||
m_input->moveCursor(QTextCursor::End);
|
||||
const QString title = text.isEmpty() ? QFileInfo(files.value(0)).fileName()
|
||||
: text.simplified().left(24);
|
||||
if (m_current >= 0 && !title.isEmpty()) {
|
||||
m_conversations[m_current].title = title;
|
||||
save();
|
||||
updateSidebar();
|
||||
renderConversation();
|
||||
}
|
||||
}
|
||||
m_input->setFocus();
|
||||
|
||||
m_status->setText(tr("拖到左侧空白处=新对话,拖到左侧会话=追加到该会话,拖到右侧对话区=发给当前会话"));
|
||||
m_status->show();
|
||||
}
|
||||
|
||||
void ChatWindow::activateForAsk()
|
||||
{
|
||||
show();
|
||||
|
||||
Reference in New Issue
Block a user