@kurokeita/add-skill 2.6.0 → 2.6.1
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/bin/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: statusline-setup
|
|
3
|
-
description: 'Set up the Claude Code or Gemini/Antigravity CLI statusline as side-by-side bordered boxes: a repo box (cwd, git branch, working-tree state, last commit), a session box (model, context % + token totals, 5h/7d quota with ETA), and a work box (the current branch's pull request and its linked issues or work items, fetched from GitHub with gh or Azure DevOps with az). Use when asked to "set up my statusline", "install statusline", "configure statusline", or to add a colored multi-line status line showing rate limits, token usage, or the PR and work items for the current branch. Detects OS and installs the appropriate variant (bash + jq on Linux/macOS, PowerShell on Windows).'
|
|
3
|
+
description: 'Set up the Claude Code or Gemini/Antigravity CLI statusline as side-by-side bordered boxes: a repo box (cwd, git branch, working-tree state, last commit), a session box (model, context % + token totals, 5h/7d quota with ETA), and a work box (the current branch''s pull request and its linked issues or work items, fetched from GitHub with gh or Azure DevOps with az). Use when asked to "set up my statusline", "install statusline", "configure statusline", or to add a colored multi-line status line showing rate limits, token usage, or the PR and work items for the current branch. Detects OS and installs the appropriate variant (bash + jq on Linux/macOS, PowerShell on Windows).'
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Statusline Setup
|
|
@@ -32,6 +32,7 @@ let isAutoOpened = false
|
|
|
32
32
|
// Which conversation this process shows, and whether a prompt was sent in it here.
|
|
33
33
|
let watchedId = ""
|
|
34
34
|
let hasPromptedHere = false
|
|
35
|
+
let isClearPending = false
|
|
35
36
|
let sessionStartedAt = Date.now()
|
|
36
37
|
|
|
37
38
|
const runner =
|
|
@@ -168,7 +169,9 @@ async function checkResumed($: EngineInterface) {
|
|
|
168
169
|
const id = await $.session.id()
|
|
169
170
|
if (id !== watchedId) {
|
|
170
171
|
watchedId = id
|
|
171
|
-
|
|
172
|
+
// A /clear starts its conversation here, though the transcript's /clear row counts as a turn.
|
|
173
|
+
hasPromptedHere = isClearPending
|
|
174
|
+
isClearPending = false
|
|
172
175
|
isAutoOpenWanted = false
|
|
173
176
|
isAutoOpened = false
|
|
174
177
|
// Another conversation now: its branches start over from here.
|
|
@@ -243,6 +246,12 @@ export const register: Register = (on) => {
|
|
|
243
246
|
return result
|
|
244
247
|
})
|
|
245
248
|
|
|
249
|
+
on("session.end", async (_$, e, next) => {
|
|
250
|
+
if (e.reason === "clear") isClearPending = true
|
|
251
|
+
|
|
252
|
+
return next(e)
|
|
253
|
+
})
|
|
254
|
+
|
|
246
255
|
on("prompt.submit", async (_$, e, next) => {
|
|
247
256
|
hasPromptedHere = true
|
|
248
257
|
|
|
@@ -359,3 +359,20 @@ test("a resumed session with nothing to show still summarizes each turn once /wo
|
|
|
359
359
|
await clock.settle()
|
|
360
360
|
expect(prompts.length).toBe(before + 1)
|
|
361
361
|
})
|
|
362
|
+
|
|
363
|
+
test("/clear neither opens the pane nor summarizes the cleared conversation", async ($, on) => {
|
|
364
|
+
const clock = mock.clock(on)
|
|
365
|
+
const opened: string[] = []
|
|
366
|
+
const prompts = fakeWorld(on, opened, [message("/clear")])
|
|
367
|
+
on("session.end", (_$, e) => ({ sessionId: e.sessionId }))
|
|
368
|
+
const session = fakeSession(on, { id: "a", turns: 0 })
|
|
369
|
+
await $.session.start(START)
|
|
370
|
+
await clock.settle()
|
|
371
|
+
await $.session.end({ reason: "clear", sessionId: "a", resume: { id: "a" } })
|
|
372
|
+
// The cleared transcript opens with the /clear command row, a user turn.
|
|
373
|
+
session.id = "b"
|
|
374
|
+
session.turns = 1
|
|
375
|
+
await clock.advance(10_000)
|
|
376
|
+
expect(opened).toEqual([])
|
|
377
|
+
expect(prompts).toEqual([])
|
|
378
|
+
})
|