@hmawla/co-assistant 1.0.3 → 1.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/cli/index.js +14 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -446,7 +446,13 @@ var init_client = __esm({
|
|
|
446
446
|
}
|
|
447
447
|
try {
|
|
448
448
|
logger2.info("Starting Copilot client\u2026");
|
|
449
|
-
|
|
449
|
+
const opts = {};
|
|
450
|
+
const token = process.env.GITHUB_TOKEN;
|
|
451
|
+
if (token) {
|
|
452
|
+
opts.githubToken = token;
|
|
453
|
+
logger2.debug("Using GITHUB_TOKEN for SDK authentication");
|
|
454
|
+
}
|
|
455
|
+
this.client = new CopilotClient(opts);
|
|
450
456
|
await this.client.start();
|
|
451
457
|
this.isStarted = true;
|
|
452
458
|
logger2.info("Copilot client started successfully");
|
|
@@ -1686,7 +1692,7 @@ function createPluginRegistry(pluginsDir) {
|
|
|
1686
1692
|
init_logger();
|
|
1687
1693
|
import path3 from "path";
|
|
1688
1694
|
import { existsSync as existsSync4 } from "fs";
|
|
1689
|
-
import {
|
|
1695
|
+
import { register } from "tsx/esm/api";
|
|
1690
1696
|
var PluginManager = class {
|
|
1691
1697
|
constructor(registry, sandbox, credentials, stateRepo) {
|
|
1692
1698
|
this.registry = registry;
|
|
@@ -1786,7 +1792,12 @@ var PluginManager = class {
|
|
|
1786
1792
|
let mod;
|
|
1787
1793
|
try {
|
|
1788
1794
|
if (pluginPath.endsWith(".ts")) {
|
|
1789
|
-
|
|
1795
|
+
const unregister = register();
|
|
1796
|
+
try {
|
|
1797
|
+
mod = await import(pluginPath);
|
|
1798
|
+
} finally {
|
|
1799
|
+
unregister();
|
|
1800
|
+
}
|
|
1790
1801
|
} else {
|
|
1791
1802
|
mod = await import(pluginPath);
|
|
1792
1803
|
}
|