heyio 0.1.5 → 0.1.6

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.
@@ -2,10 +2,17 @@ import { CopilotClient } from "@github/copilot-sdk";
2
2
  let client;
3
3
  export async function getClient() {
4
4
  if (!client) {
5
- client = new CopilotClient({
5
+ const opts = {
6
6
  autoStart: true,
7
- autoRestart: true,
8
- });
7
+ };
8
+ // Pass explicit token if available (env vars are also auto-detected by the SDK)
9
+ const token = process.env.COPILOT_GITHUB_TOKEN
10
+ || process.env.GH_TOKEN
11
+ || process.env.GITHUB_TOKEN;
12
+ if (token) {
13
+ opts.githubToken = token;
14
+ }
15
+ client = new CopilotClient(opts);
9
16
  await client.start();
10
17
  }
11
18
  return client;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "IO — a personal AI assistant built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"