@hasna/assistants 0.6.21 → 0.6.22
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 +33 -7
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -41900,8 +41900,19 @@ Keep it concise but comprehensive.`
|
|
|
41900
41900
|
handler: async (args, context) => {
|
|
41901
41901
|
const id = args.trim();
|
|
41902
41902
|
if (!id) {
|
|
41903
|
-
|
|
41903
|
+
const schedules = await listSchedules(context.cwd);
|
|
41904
|
+
if (schedules.length === 0) {
|
|
41905
|
+
context.emit("text", `No schedules found.
|
|
41904
41906
|
`);
|
|
41907
|
+
} else {
|
|
41908
|
+
const lines = schedules.sort((a, b) => (a.nextRunAt || 0) - (b.nextRunAt || 0)).map((schedule) => `- ${schedule.id} [${schedule.status}] ${schedule.command}`);
|
|
41909
|
+
context.emit("text", `Usage: /pause <id>
|
|
41910
|
+
|
|
41911
|
+
Available schedules:
|
|
41912
|
+
${lines.join(`
|
|
41913
|
+
`)}
|
|
41914
|
+
`);
|
|
41915
|
+
}
|
|
41905
41916
|
context.emit("done");
|
|
41906
41917
|
return { handled: true };
|
|
41907
41918
|
}
|
|
@@ -41927,8 +41938,19 @@ Keep it concise but comprehensive.`
|
|
|
41927
41938
|
handler: async (args, context) => {
|
|
41928
41939
|
const id = args.trim();
|
|
41929
41940
|
if (!id) {
|
|
41930
|
-
|
|
41941
|
+
const schedules = await listSchedules(context.cwd);
|
|
41942
|
+
if (schedules.length === 0) {
|
|
41943
|
+
context.emit("text", `No schedules found.
|
|
41931
41944
|
`);
|
|
41945
|
+
} else {
|
|
41946
|
+
const lines = schedules.sort((a, b) => (a.nextRunAt || 0) - (b.nextRunAt || 0)).map((schedule) => `- ${schedule.id} [${schedule.status}] ${schedule.command}`);
|
|
41947
|
+
context.emit("text", `Usage: /resume <id>
|
|
41948
|
+
|
|
41949
|
+
Available schedules:
|
|
41950
|
+
${lines.join(`
|
|
41951
|
+
`)}
|
|
41952
|
+
`);
|
|
41953
|
+
}
|
|
41932
41954
|
context.emit("done");
|
|
41933
41955
|
return { handled: true };
|
|
41934
41956
|
}
|
|
@@ -47760,9 +47782,13 @@ function App2({ cwd: cwd2, version }) {
|
|
|
47760
47782
|
const prevDisplayLineCountRef = import_react29.useRef(0);
|
|
47761
47783
|
const skipNextDoneRef = import_react29.useRef(false);
|
|
47762
47784
|
const isProcessingRef = import_react29.useRef(isProcessing);
|
|
47785
|
+
const processingStartTimeRef = import_react29.useRef(processingStartTime);
|
|
47763
47786
|
import_react29.useEffect(() => {
|
|
47764
47787
|
isProcessingRef.current = isProcessing;
|
|
47765
47788
|
}, [isProcessing]);
|
|
47789
|
+
import_react29.useEffect(() => {
|
|
47790
|
+
processingStartTimeRef.current = processingStartTime;
|
|
47791
|
+
}, [processingStartTime]);
|
|
47766
47792
|
import_react29.useEffect(() => {
|
|
47767
47793
|
if (isProcessing && !processingStartTime) {
|
|
47768
47794
|
setProcessingStartTime(Date.now());
|
|
@@ -47815,8 +47841,8 @@ function App2({ cwd: cwd2, version }) {
|
|
|
47815
47841
|
|
|
47816
47842
|
[error]` : "[error]";
|
|
47817
47843
|
}
|
|
47818
|
-
if (
|
|
47819
|
-
const workedFor = formatElapsedDuration(Date.now() -
|
|
47844
|
+
if (processingStartTimeRef.current) {
|
|
47845
|
+
const workedFor = formatElapsedDuration(Date.now() - processingStartTimeRef.current);
|
|
47820
47846
|
content = content ? `${content}
|
|
47821
47847
|
|
|
47822
47848
|
\u273B Worked for ${workedFor}` : `\u273B Worked for ${workedFor}`;
|
|
@@ -47833,7 +47859,7 @@ function App2({ cwd: cwd2, version }) {
|
|
|
47833
47859
|
}
|
|
47834
47860
|
]);
|
|
47835
47861
|
return true;
|
|
47836
|
-
}, [buildFullResponse
|
|
47862
|
+
}, [buildFullResponse]);
|
|
47837
47863
|
const resetTurnState = import_react29.useCallback(() => {
|
|
47838
47864
|
setCurrentResponse("");
|
|
47839
47865
|
responseRef.current = "";
|
|
@@ -48714,7 +48740,7 @@ function formatStreamEvent(chunk) {
|
|
|
48714
48740
|
|
|
48715
48741
|
// packages/terminal/src/index.tsx
|
|
48716
48742
|
var jsx_dev_runtime10 = __toESM(require_jsx_dev_runtime(), 1);
|
|
48717
|
-
var VERSION3 = "0.6.
|
|
48743
|
+
var VERSION3 = "0.6.22";
|
|
48718
48744
|
process.env.ASSISTANTS_VERSION ??= VERSION3;
|
|
48719
48745
|
function parseArgs(argv) {
|
|
48720
48746
|
const args = argv.slice(2);
|
|
@@ -48871,4 +48897,4 @@ if (options.print !== null) {
|
|
|
48871
48897
|
});
|
|
48872
48898
|
}
|
|
48873
48899
|
|
|
48874
|
-
//# debugId=
|
|
48900
|
+
//# debugId=F27739426C3D43A464756E2164756E21
|