dbus: pass systemPrompt arg to CreateSession calls
This commit is contained in:
parent
90fe8e3478
commit
1afedfca7d
|
|
@ -8,7 +8,7 @@ TARGET="$(cd "$TARGET" 2>/dev/null && pwd)" || TARGET="$PWD"
|
|||
|
||||
RESULT=$(dbus-send --session --dest=org.ollie.SessionManager --type=method_call --print-reply \
|
||||
/org/ollie/SessionManager org.ollie.SessionManager.CreateSession \
|
||||
string:"$TARGET" string:"" string:"" string:"default" 2>&1)
|
||||
string:"$TARGET" string:"" string:"" string:"default" string:"" 2>&1)
|
||||
|
||||
SESSION_ID=$(echo "$RESULT" | grep 'string "' | head -1 | sed 's/.*string "\(.*\)"/\1/')
|
||||
|
||||
|
|
|
|||
|
|
@ -587,7 +587,7 @@ void OllieKateView::newSession()
|
|||
|
||||
QString backend = m_plugin->defaultBackend();
|
||||
QString model = m_plugin->defaultModel();
|
||||
QDBusReply<QString> reply = m_iface->call("CreateSession", cwd, backend, model, "default");
|
||||
QDBusReply<QString> reply = m_iface->call("CreateSession", cwd, backend, model, "default", QString());
|
||||
if (reply.isValid()) {
|
||||
m_sessionId = reply.value();
|
||||
m_rawChat.clear();
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ QString OllieDBusClient::createSession(const QString &cwd)
|
|||
{
|
||||
QString dir = cwd.isEmpty() ? QDir::homePath() : cwd;
|
||||
// Use asyncCall — we'll pick up the new session via the SessionCreated signal
|
||||
m_iface->asyncCall("CreateSession", dir, QString(), QString(), QString("default"));
|
||||
m_iface->asyncCall("CreateSession", dir, QString(), QString(), QString("default"), QString());
|
||||
return QString(); // ID not available synchronously; signal will trigger refresh
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ echo ""
|
|||
echo "=== CreateSession ==="
|
||||
RESULT=$(dbus-send --session --dest=$SERVICE --type=method_call --print-reply \
|
||||
$PATH_OBJ $IFACE.CreateSession \
|
||||
string:"$HOME" string:"" string:"" string:"default")
|
||||
string:"$HOME" string:"" string:"" string:"default" string:"")
|
||||
echo "$RESULT"
|
||||
SESSION_ID=$(echo "$RESULT" | grep 'string "' | head -1 | sed 's/.*string "//;s/"//')
|
||||
echo "Session ID: $SESSION_ID"
|
||||
|
|
|
|||
|
|
@ -9,12 +9,12 @@ IFACE="org.ollie.SessionManager"
|
|||
|
||||
echo "=== Create session A ==="
|
||||
A=$(dbus-send --session --dest=$SERVICE --type=method_call --print-reply \
|
||||
$OBJ $IFACE.CreateSession string:"$HOME" string:"" string:"" string:"default" | grep 'string "' | head -1 | sed 's/.*string "//;s/"//')
|
||||
$OBJ $IFACE.CreateSession string:"$HOME" string:"" string:"" string:"default" string:"" | grep 'string "' | head -1 | sed 's/.*string "//;s/"//')
|
||||
echo "A: $A"
|
||||
|
||||
echo "=== Create session B ==="
|
||||
B=$(dbus-send --session --dest=$SERVICE --type=method_call --print-reply \
|
||||
$OBJ $IFACE.CreateSession string:"$HOME" string:"" string:"" string:"default" | grep 'string "' | head -1 | sed 's/.*string "//;s/"//')
|
||||
$OBJ $IFACE.CreateSession string:"$HOME" string:"" string:"" string:"default" string:"" | grep 'string "' | head -1 | sed 's/.*string "//;s/"//')
|
||||
echo "B: $B"
|
||||
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ void OllieTray::onStateChanged(const QString &session_id, const QString &new_sta
|
|||
void OllieTray::newSession()
|
||||
{
|
||||
QString cwd = QDir::homePath();
|
||||
QDBusReply<QString> reply = m_iface->call("CreateSession", cwd, QString(), QString(), "default");
|
||||
QDBusReply<QString> reply = m_iface->call("CreateSession", cwd, QString(), QString(), "default", QString());
|
||||
if (reply.isValid()) {
|
||||
qDebug() << "Created session:" << reply.value();
|
||||
} else {
|
||||
|
|
|
|||
Reference in New Issue