Merge pull request #1222 from ispyisail/feature/script-live

Add live mode: an AI assistant works on the open project as you watch
This commit is contained in:
ispyisail
2026-10-02 15:12:17 +13:00
committed by GitHub
14 changed files with 622 additions and 15 deletions
+16
View File
@@ -404,6 +404,18 @@ bool QetScriptApi::save(const QString &output)
void QetScriptApi::log(const QString &message)
{
QTextStream(stderr) << message << "\n";
if (m_live_log) m_live_log->append(message);
}
/**
@brief QetScriptApi::setLive
A run asked for by an assistant (LiveServer): what the script logs is
collected in @p log for the answer, and a message box -- which would
wait for someone who did not ask for it -- is logged instead.
*/
void QetScriptApi::setLive(QStringList *log)
{
m_live_log = log;
}
/**
@@ -4480,5 +4492,9 @@ bool QetScriptApi::zoomReset()
*/
void QetScriptApi::showMessage(const QString &text)
{
if (m_live_log) {
log(QStringLiteral("qet.showMessage: ") + text);
return;
}
QET::QetMessageBox::information(nullptr, QObject::tr("Script"), text);
}