@agent-webui/ai-desk-daemon 1.0.49-beta2 → 1.0.49-beta4

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/README.md CHANGED
@@ -338,7 +338,7 @@ function AgentPanel() {
338
338
 
339
339
  **检查日志**:
340
340
  ```bash
341
- tail -f ~/.aidesktop/logs/daemon.log
341
+ aidesk logs -f
342
342
  ```
343
343
 
344
344
  **手动启动测试**:
package/lib/config.js CHANGED
@@ -10,6 +10,7 @@ const DEFAULT_PORT = 9527;
10
10
  const DEFAULT_CONFIG = {
11
11
  port: DEFAULT_PORT,
12
12
  logLevel: 'info',
13
+ log_redaction_enabled: false,
13
14
  autoStart: true,
14
15
  cli_anything: {
15
16
  enabled: false,
package/lib/platform.js CHANGED
@@ -177,8 +177,9 @@ function resolveBaseLogPath(baseLogPath = getConfiguredLogPath()) {
177
177
  return path.resolve(expandHomePath(trimmedPath));
178
178
  }
179
179
 
180
- function parseRollingLogFilename(prefix, filename) {
181
- const pattern = new RegExp(`^${prefix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}-([0-9]{8})(?:-([0-9]+))?\\.log$`);
180
+ function parseRollingLogFilename(prefix, extension, filename) {
181
+ const normalizedExtension = extension || '.log';
182
+ const pattern = new RegExp(`^${prefix.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}-([0-9]{8})(?:-([0-9]+))?${normalizedExtension.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}$`);
182
183
  const match = filename.match(pattern);
183
184
  if (!match) {
184
185
  return null;
@@ -204,6 +205,7 @@ function findLatestRollingLogPath(baseLogPath = getConfiguredLogPath()) {
204
205
  const resolvedBaseLogPath = resolveBaseLogPath(baseLogPath);
205
206
  const logDir = path.dirname(resolvedBaseLogPath);
206
207
  const prefix = path.basename(resolvedBaseLogPath, path.extname(resolvedBaseLogPath));
208
+ const extension = path.extname(resolvedBaseLogPath) || '.log';
207
209
 
208
210
  if (!fs.existsSync(logDir)) {
209
211
  return '';
@@ -211,7 +213,7 @@ function findLatestRollingLogPath(baseLogPath = getConfiguredLogPath()) {
211
213
 
212
214
  const entries = [];
213
215
  for (const filename of fs.readdirSync(logDir)) {
214
- const parsed = parseRollingLogFilename(prefix, filename);
216
+ const parsed = parseRollingLogFilename(prefix, extension, filename);
215
217
  if (!parsed) {
216
218
  continue;
217
219
  }
@@ -234,10 +236,11 @@ function getExpectedRollingLogPath(baseLogPath = getConfiguredLogPath(), now = n
234
236
  const resolvedBaseLogPath = resolveBaseLogPath(baseLogPath);
235
237
  const logDir = path.dirname(resolvedBaseLogPath);
236
238
  const prefix = path.basename(resolvedBaseLogPath, path.extname(resolvedBaseLogPath));
239
+ const extension = path.extname(resolvedBaseLogPath) || '.log';
237
240
  const year = now.getFullYear().toString().padStart(4, '0');
238
241
  const month = `${now.getMonth() + 1}`.padStart(2, '0');
239
242
  const day = `${now.getDate()}`.padStart(2, '0');
240
- return path.join(logDir, `${prefix}-${year}${month}${day}.log`);
243
+ return path.join(logDir, `${prefix}-${year}${month}${day}${extension}`);
241
244
  }
242
245
 
243
246
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-webui/ai-desk-daemon",
3
- "version": "1.0.49-beta2",
3
+ "version": "1.0.49-beta4",
4
4
  "description": "AI Desk Daemon - CLI tool for managing the AI Desk daemon service",
5
5
  "workspaces": [
6
6
  "packages/*"