|
@@ -81,7 +81,9 @@ export namespace Session {
|
|
|
const result: Info = {
|
|
const result: Info = {
|
|
|
id: Identifier.descending("session"),
|
|
id: Identifier.descending("session"),
|
|
|
parentID,
|
|
parentID,
|
|
|
- title: "Child Session - " + new Date().toISOString(),
|
|
|
|
|
|
|
+ title:
|
|
|
|
|
+ (parentID ? "Child session - " : "New Session - ") +
|
|
|
|
|
+ new Date().toISOString(),
|
|
|
time: {
|
|
time: {
|
|
|
created: Date.now(),
|
|
created: Date.now(),
|
|
|
updated: Date.now(),
|
|
updated: Date.now(),
|
|
@@ -221,7 +223,8 @@ export namespace Session {
|
|
|
if (lastSummary) msgs = msgs.filter((msg) => msg.id >= lastSummary.id)
|
|
if (lastSummary) msgs = msgs.filter((msg) => msg.id >= lastSummary.id)
|
|
|
|
|
|
|
|
const app = App.info()
|
|
const app = App.info()
|
|
|
- if (msgs.length === 0) {
|
|
|
|
|
|
|
+ const session = await get(input.sessionID)
|
|
|
|
|
+ if (msgs.length === 0 && !session.parentID) {
|
|
|
generateText({
|
|
generateText({
|
|
|
maxOutputTokens: 20,
|
|
maxOutputTokens: 20,
|
|
|
messages: convertToModelMessages([
|
|
messages: convertToModelMessages([
|