@ridit/lens 0.4.4 → 0.4.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -78166,7 +78166,7 @@ async function runHeadless(opts) {
78166
78166
  }
78167
78167
  }
78168
78168
  session = addMessage(session, "user", prompt);
78169
- if (!opts.single)
78169
+ if (!opts.single || opts.sessionId)
78170
78170
  saveSession(session);
78171
78171
  const toolLog = [];
78172
78172
  const denied = [];
@@ -78191,7 +78191,7 @@ async function runHeadless(opts) {
78191
78191
  },
78192
78192
  onFinish: (message, responseMessages, model) => {
78193
78193
  session = appendMessages(session, responseMessages);
78194
- if (!opts.single)
78194
+ if (!opts.single || opts.sessionId)
78195
78195
  saveSession(session);
78196
78196
  const output = {
78197
78197
  message,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ridit/lens",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "Understand your codebase.",
5
5
  "author": "Ridit Jangra <riditjangra09@gmail.com> (https://ridit.space)",
6
6
  "license": "MIT",
package/src/index.tsx CHANGED
@@ -96,7 +96,7 @@ async function runHeadless(opts: {
96
96
 
97
97
  session = addMessage(session, "user", prompt);
98
98
  // save now so context is available on follow-up messages even if we exit early
99
- if (!opts.single) saveSession(session);
99
+ if (!opts.single || opts.sessionId) saveSession(session);
100
100
 
101
101
  const toolLog: { tool: string; args: unknown; result: unknown }[] = [];
102
102
  const denied: { tool: string; description: string }[] = [];
@@ -125,7 +125,7 @@ async function runHeadless(opts: {
125
125
  },
126
126
  onFinish: (message, responseMessages, model) => {
127
127
  session = appendMessages(session, responseMessages);
128
- if (!opts.single) saveSession(session);
128
+ if (!opts.single || opts.sessionId) saveSession(session);
129
129
 
130
130
  const output: Record<string, unknown> = {
131
131
  message,