yt-briefing 1.2.1 → 1.2.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-briefing",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "A self-learning YouTube briefing for Claude Code: it sweeps the channels you follow, filters noise in two stages (title, then transcript), gives you a short briefing of the rest in your language in a pane, and adapts to your ratings — one video at a time.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "yt-briefing",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "description": "The /yt briefing loop as a Claude Code pane: summary, one-key rating, research hand-off.",
5
5
  "author": {
6
6
  "name": "Michal Ryzio"
@@ -172,14 +172,22 @@ async function paneUnseen($: EngineInterface, origin: { kind: string } | undefin
172
172
  return !(await $.session.surfaces()).some(s => s !== 'terminal')
173
173
  }
174
174
 
175
+ /** The briefing as transcript text: plain, with the filtered-out count at the end. */
176
+ function briefing(out: SweepOut): string {
177
+ return [plain(out.summary ?? ''), out.skipped ? `(${out.skipped} filtered out)` : undefined]
178
+ .filter(line => line !== undefined).join('\n\n')
179
+ }
180
+
175
181
  /** The rating loop in the engine's question dialog, from a sweep already run, for a session where no pane can be seen. */
176
182
  async function dialogLoop($: EngineInterface, first: SweepOut) {
177
183
  let out = first
178
- for (;;) {
184
+ for (let shown = true; ; shown = false) {
179
185
  if (out.status !== 'rating_needed' || !out.summary || !out.pending) return void $.ui.log(endText(out))
180
186
 
181
- const filtered = out.skipped ? `(${out.skipped} filtered out)` : undefined
182
- const question = [plain(out.summary), filtered, '', 'Rating?'].filter(line => line !== undefined).join('\n')
187
+ // The dialog draws its question in a large heading face, so the briefing goes to the
188
+ // transcript as text and the dialog asks only for the rating. The first is the command's output.
189
+ if (!shown) $.ui.log(briefing(out))
190
+ const question = `${out.pending.channel}: rating?`
183
191
  let answer: string
184
192
  try {
185
193
  answer = (await $.ui.ask(question, { header: 'yt-briefing', options: CHOICES })).trim()
@@ -235,7 +243,7 @@ export const register: Register = on => {
235
243
  if (first.status !== 'rating_needed') return { text: endText(first) }
236
244
  void dialogLoop($, first)
237
245
 
238
- return { text: 'Briefing ready: rate it in the question dialog.' }
246
+ return { text: briefing(first) }
239
247
  })
240
248
 
241
249
  on('ui.render', { component: 'Pane', requestId: PANE }, async ($, e) => {