@icaruk/zai-peak-hours 0.0.3 → 0.0.5
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.d.ts +1 -2
- package/dist/index.js +3 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { tool } from '@opencode-ai/plugin';
|
|
2
2
|
import { getPeakHoursStatus, formatPeakHoursMessage } from './peak-hours';
|
|
3
3
|
import { DEFAULT_CONFIG } from './config';
|
|
4
|
-
import * as fs from 'fs';
|
|
5
|
-
import * as path from 'path';
|
|
4
|
+
import * as fs from 'node:fs';
|
|
5
|
+
import * as path from 'node:path';
|
|
6
6
|
let timerId = null;
|
|
7
7
|
let configCache = null;
|
|
8
8
|
function getConfigPath() {
|
|
@@ -74,7 +74,7 @@ Time until ${status.transitionType}: ${status.timeUntilTransition}
|
|
|
74
74
|
}
|
|
75
75
|
});
|
|
76
76
|
}
|
|
77
|
-
export const
|
|
77
|
+
export const PeakHoursPlugin = async ({ client }) => {
|
|
78
78
|
const config = loadConfig();
|
|
79
79
|
const updateInterval = config.updateIntervalMinutes * 60 * 1000;
|
|
80
80
|
await client.tui.showToast({
|
|
@@ -145,4 +145,3 @@ Time until ${status.transitionType}: ${status.timeUntilTransition}
|
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
147
|
};
|
|
148
|
-
export default plugin;
|