pikiclaw 0.3.21 → 0.3.22

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.
@@ -123,10 +123,10 @@ export function extractLastSessionTurn(messages) {
123
123
  return null;
124
124
  return { userText, assistantText };
125
125
  }
126
- export async function getSessionTurnPreviewData(bot, agent, sessionId, limit = 50) {
126
+ export async function getSessionTurnPreviewData(bot, agent, sessionId, limit = 50, workdir) {
127
127
  if (!sessionId)
128
128
  return null;
129
- const tail = await bot.fetchSessionTail(agent, sessionId, limit);
129
+ const tail = await bot.fetchSessionTail(agent, sessionId, limit, workdir);
130
130
  if (!tail.ok || !tail.messages.length)
131
131
  return null;
132
132
  return extractLastSessionTurn(tail.messages);
@@ -960,7 +960,7 @@ export class FeishuBot extends Bot {
960
960
  }
961
961
  async previewCurrentSessionTurn(chatId, agent, sessionId) {
962
962
  try {
963
- const preview = await getSessionTurnPreviewData(this, agent, sessionId, 50);
963
+ const preview = await getSessionTurnPreviewData(this, agent, sessionId, 50, this.chatWorkdir(chatId));
964
964
  if (!preview)
965
965
  return;
966
966
  const previewMarkdown = renderSessionTurnMarkdown(preview.userText, preview.assistantText);
@@ -932,7 +932,7 @@ export class TelegramBot extends Bot {
932
932
  }
933
933
  async previewCurrentSessionTurn(chatId, agent, sessionId) {
934
934
  try {
935
- const preview = await getSessionTurnPreviewData(this, agent, sessionId, 50);
935
+ const preview = await getSessionTurnPreviewData(this, agent, sessionId, 50, this.chatWorkdir(chatId));
936
936
  if (!preview)
937
937
  return;
938
938
  const previewHtml = renderSessionTurnHtml(preview.userText, preview.assistantText);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pikiclaw",
3
- "version": "0.3.21",
3
+ "version": "0.3.22",
4
4
  "description": "Put the world's smartest AI agents in your pocket. Command local Claude & Gemini via IM. | 让最好用的 IM 变成你电脑上的顶级 Agent 控制台",
5
5
  "type": "module",
6
6
  "bin": {