@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/index.js
CHANGED
|
@@ -821,7 +821,13 @@ var CopilotClientWrapper = class {
|
|
|
821
821
|
}
|
|
822
822
|
try {
|
|
823
823
|
logger2.info("Starting Copilot client\u2026");
|
|
824
|
-
|
|
824
|
+
const opts = {};
|
|
825
|
+
const token = process.env.GITHUB_TOKEN;
|
|
826
|
+
if (token) {
|
|
827
|
+
opts.githubToken = token;
|
|
828
|
+
logger2.debug("Using GITHUB_TOKEN for SDK authentication");
|
|
829
|
+
}
|
|
830
|
+
this.client = new CopilotClient(opts);
|
|
825
831
|
await this.client.start();
|
|
826
832
|
this.isStarted = true;
|
|
827
833
|
logger2.info("Copilot client started successfully");
|
|
@@ -1553,7 +1559,7 @@ function createPluginRegistry(pluginsDir) {
|
|
|
1553
1559
|
// src/plugins/manager.ts
|
|
1554
1560
|
import path3 from "path";
|
|
1555
1561
|
import { existsSync as existsSync4 } from "fs";
|
|
1556
|
-
import {
|
|
1562
|
+
import { register } from "tsx/esm/api";
|
|
1557
1563
|
var PluginManager = class {
|
|
1558
1564
|
constructor(registry, sandbox, credentials, stateRepo) {
|
|
1559
1565
|
this.registry = registry;
|
|
@@ -1653,7 +1659,12 @@ var PluginManager = class {
|
|
|
1653
1659
|
let mod;
|
|
1654
1660
|
try {
|
|
1655
1661
|
if (pluginPath.endsWith(".ts")) {
|
|
1656
|
-
|
|
1662
|
+
const unregister = register();
|
|
1663
|
+
try {
|
|
1664
|
+
mod = await import(pluginPath);
|
|
1665
|
+
} finally {
|
|
1666
|
+
unregister();
|
|
1667
|
+
}
|
|
1657
1668
|
} else {
|
|
1658
1669
|
mod = await import(pluginPath);
|
|
1659
1670
|
}
|