opencode-remote-control 0.2.1 → 0.2.3

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.
Files changed (2) hide show
  1. package/dist/cli.js +14 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -81,6 +81,7 @@ async function promptToken() {
81
81
  process.stdout.write('Enter your bot token: ');
82
82
  // Read from stdin
83
83
  const token = await new Promise((resolve) => {
84
+ process.stdin.resume();
84
85
  process.stdin.setEncoding('utf8');
85
86
  const cleanup = () => {
86
87
  process.stdin.pause();
@@ -97,6 +98,10 @@ async function promptToken() {
97
98
  resolve(chunk.toString().trim());
98
99
  });
99
100
  });
101
+ if (!token) {
102
+ console.log('\nCancelled');
103
+ process.exit(0);
104
+ }
100
105
  return token;
101
106
  }
102
107
  async function promptFeishuConfig() {
@@ -111,6 +116,7 @@ async function promptFeishuConfig() {
111
116
  const promptInput = async (promptText) => {
112
117
  process.stdout.write(promptText);
113
118
  return new Promise((resolve) => {
119
+ process.stdin.resume();
114
120
  process.stdin.setEncoding('utf8');
115
121
  const cleanup = () => {
116
122
  process.stdin.pause();
@@ -129,7 +135,15 @@ async function promptFeishuConfig() {
129
135
  });
130
136
  };
131
137
  const appId = await promptInput('Enter your App ID: ');
138
+ if (!appId) {
139
+ console.log('\nCancelled');
140
+ process.exit(0);
141
+ }
132
142
  const appSecret = await promptInput('Enter your App Secret: ');
143
+ if (!appSecret) {
144
+ console.log('\nCancelled');
145
+ process.exit(0);
146
+ }
133
147
  return { appId, appSecret };
134
148
  }
135
149
  function showFeishuSetupGuide() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-remote-control",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "description": "Control OpenCode from anywhere via Telegram or Feishu",
5
5
  "type": "module",
6
6
  "bin": {