ccstatusline 2.0.22 → 2.0.23
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/ccstatusline.js +35 -2
- package/package.json +1 -1
package/dist/ccstatusline.js
CHANGED
|
@@ -51405,7 +51405,7 @@ import { execSync as execSync3 } from "child_process";
|
|
|
51405
51405
|
import * as fs5 from "fs";
|
|
51406
51406
|
import * as path4 from "path";
|
|
51407
51407
|
var __dirname = "/Users/sirmalloc/Projects/Personal/ccstatusline/src/utils";
|
|
51408
|
-
var PACKAGE_VERSION = "2.0.
|
|
51408
|
+
var PACKAGE_VERSION = "2.0.23";
|
|
51409
51409
|
function getPackageVersion() {
|
|
51410
51410
|
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
51411
51411
|
return PACKAGE_VERSION;
|
|
@@ -54308,6 +54308,38 @@ var CurrentWorkingDirEditor = ({ widget, onComplete, onCancel, action }) => {
|
|
|
54308
54308
|
children: "Unknown editor mode"
|
|
54309
54309
|
}, undefined, false, undefined, this);
|
|
54310
54310
|
};
|
|
54311
|
+
// src/widgets/ClaudeSessionId.ts
|
|
54312
|
+
class ClaudeSessionIdWidget {
|
|
54313
|
+
getDefaultColor() {
|
|
54314
|
+
return "cyan";
|
|
54315
|
+
}
|
|
54316
|
+
getDescription() {
|
|
54317
|
+
return "Shows the current Claude Code session ID reported in status JSON";
|
|
54318
|
+
}
|
|
54319
|
+
getDisplayName() {
|
|
54320
|
+
return "Claude Session ID";
|
|
54321
|
+
}
|
|
54322
|
+
getEditorDisplay(item) {
|
|
54323
|
+
return { displayText: this.getDisplayName() };
|
|
54324
|
+
}
|
|
54325
|
+
render(item, context, settings) {
|
|
54326
|
+
if (context.isPreview) {
|
|
54327
|
+
return item.rawValue ? "preview-session-id" : "Session ID: preview-session-id";
|
|
54328
|
+
} else {
|
|
54329
|
+
const sessionId = context.data?.session_id;
|
|
54330
|
+
if (!sessionId) {
|
|
54331
|
+
return null;
|
|
54332
|
+
}
|
|
54333
|
+
return item.rawValue ? sessionId : `Session ID: ${sessionId}`;
|
|
54334
|
+
}
|
|
54335
|
+
}
|
|
54336
|
+
supportsRawValue() {
|
|
54337
|
+
return true;
|
|
54338
|
+
}
|
|
54339
|
+
supportsColors(item) {
|
|
54340
|
+
return true;
|
|
54341
|
+
}
|
|
54342
|
+
}
|
|
54311
54343
|
// src/utils/widgets.ts
|
|
54312
54344
|
var widgetRegistry = new Map([
|
|
54313
54345
|
["model", new ModelWidget],
|
|
@@ -54329,7 +54361,8 @@ var widgetRegistry = new Map([
|
|
|
54329
54361
|
["terminal-width", new TerminalWidthWidget],
|
|
54330
54362
|
["version", new VersionWidget],
|
|
54331
54363
|
["custom-text", new CustomTextWidget],
|
|
54332
|
-
["custom-command", new CustomCommandWidget]
|
|
54364
|
+
["custom-command", new CustomCommandWidget],
|
|
54365
|
+
["claude-session-id", new ClaudeSessionIdWidget]
|
|
54333
54366
|
]);
|
|
54334
54367
|
function getWidget(type) {
|
|
54335
54368
|
return widgetRegistry.get(type) ?? null;
|