@staff0rd/assist 0.291.0 → 0.292.0

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/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.291.0",
9
+ version: "0.292.0",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -15855,12 +15855,16 @@ function filterToSql(filter) {
15855
15855
  }
15856
15856
 
15857
15857
  // src/commands/seq/fetchSeqData.ts
15858
- async function fetchSeqData(conn, filter, count6, from, to) {
15858
+ function buildDataParams(filter, count6, from, to) {
15859
15859
  const sqlFilter = filterToSql(filter);
15860
15860
  const sql4 = `select @Timestamp, @Level, @Exception, @Message from stream where ${sqlFilter} order by @Timestamp desc limit ${count6}`;
15861
15861
  const params = new URLSearchParams({ q: sql4 });
15862
- if (from) params.set("fromDateUtc", from);
15863
- if (to) params.set("toDateUtc", to);
15862
+ if (from) params.set("rangeStartUtc", from);
15863
+ if (to) params.set("rangeEndUtc", to);
15864
+ return params;
15865
+ }
15866
+ async function fetchSeqData(conn, filter, count6, from, to) {
15867
+ const params = buildDataParams(filter, count6, from, to);
15864
15868
  const response = await fetchSeq(conn, "/api/data", params);
15865
15869
  const data = await response.json();
15866
15870
  return mapDataToEvents(data);
@@ -18893,7 +18897,12 @@ function handleHello(state, msg) {
18893
18897
  function handleCreated(state, msg) {
18894
18898
  daemonLog(`windows daemon: created session ${nsId(msg)}`);
18895
18899
  const client = state.pendingCreators.shift();
18896
- if (client) sendTo(client, { type: "created", sessionId: nsId(msg) });
18900
+ if (client)
18901
+ sendTo(client, {
18902
+ type: "created",
18903
+ sessionId: nsId(msg),
18904
+ isNew: msg.isNew
18905
+ });
18897
18906
  else daemonLog("windows daemon: created with no pending creator (dropped)");
18898
18907
  }
18899
18908
  function handleSessions(state, msg) {
@@ -19599,10 +19608,10 @@ function safeParse2(line) {
19599
19608
  }
19600
19609
 
19601
19610
  // src/commands/sessions/daemon/dispatchMessage.ts
19602
- function creator(spawn12) {
19611
+ function creator(isNew, spawn12) {
19603
19612
  return (client, m, d) => {
19604
19613
  if (m.windowsProxy.route(client, d)) return;
19605
- sendTo(client, { type: "created", sessionId: spawn12(m, d) });
19614
+ sendTo(client, { type: "created", sessionId: spawn12(m, d), isNew });
19606
19615
  };
19607
19616
  }
19608
19617
  function handleHistory(client) {
@@ -19630,9 +19639,11 @@ var handlers = {
19630
19639
  ping: (client) => sendTo(client, { type: "pong", pid: process.pid }),
19631
19640
  hello: (client) => sendTo(client, buildHello()),
19632
19641
  create: creator(
19642
+ true,
19633
19643
  (m, d) => m.spawn(d.prompt, d.cwd)
19634
19644
  ),
19635
19645
  "create-run": creator(
19646
+ true,
19636
19647
  (m, d) => m.spawnRun(
19637
19648
  d.runName,
19638
19649
  d.runArgs ?? [],
@@ -19640,12 +19651,14 @@ var handlers = {
19640
19651
  )
19641
19652
  ),
19642
19653
  "create-assist": creator(
19654
+ true,
19643
19655
  (m, d) => m.spawnAssist(
19644
19656
  d.assistArgs ?? [],
19645
19657
  d.cwd
19646
19658
  )
19647
19659
  ),
19648
19660
  resume: creator(
19661
+ false,
19649
19662
  (m, d) => m.resume(
19650
19663
  d.sessionId,
19651
19664
  d.cwd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.291.0",
3
+ "version": "0.292.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {