@mobius-os/mobius 0.2.6 → 0.2.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mobius-os/mobius",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "description": "Mobius terminal client. Reuses Mobius frontend TypeScript types and jsonl entry shapes.",
6
6
  "bin": {
@@ -35,7 +35,7 @@ interface TerminalSize {
35
35
  isTty: boolean
36
36
  }
37
37
 
38
- const VERSION = '0.2.6'
38
+ const VERSION = '0.2.7'
39
39
  const WELCOME_ROWS = 12
40
40
  const CHROME_ROWS = 11
41
41
 
@@ -131,11 +131,13 @@ export function PrepScreen({ client, onReady, onQuit }: {
131
131
  setStep(next)
132
132
  if (!next) finish(iss, p)
133
133
  }
134
- async function createIssue(name: string, useWt: boolean) {
134
+ async function createIssue(name: string) {
135
135
  if (!project) return
136
136
  setStatusMsg('创建任务…')
137
137
  try {
138
- const iss = await client.createIssue(project.id, { title: name || '命令行任务', description: '由 TUI 创建', use_worktree: useWt })
138
+ // git worktree is disabled by default and not offered as a choice TUI
139
+ // tasks always run in the bound working tree.
140
+ const iss = await client.createIssue(project.id, { title: name || '命令行任务', description: '由 TUI 创建', use_worktree: false })
139
141
  setIssues(await client.listIssues(project.id, 'active'))
140
142
  await pickIssue(iss)
141
143
  } catch (e: any) { setStatusMsg(`创建任务失败: ${e?.message ?? e}`) }
@@ -278,29 +280,21 @@ function ProjectPicker({ cwd, projects, statusMsg, onPick, onCreate, onQuit }: {
278
280
  function IssuePicker({ issues, onPick, onCreate }: {
279
281
  issues: Issue[]
280
282
  onPick: (i: Issue) => void
281
- onCreate: (name: string, useWt: boolean) => void
283
+ onCreate: (name: string) => void
282
284
  }) {
283
- const [mode, setMode] = useState<'list' | 'create-name' | 'create-wt'>('list')
285
+ const [mode, setMode] = useState<'list' | 'create-name'>('list')
284
286
  const [name, setName] = useState('')
285
287
 
286
288
  if (mode === 'create-name') {
289
+ // git worktree is disabled by default and the option is intentionally not
290
+ // offered — TUI-created tasks always run in the bound working tree.
287
291
  return (
288
292
  <Box flexDirection="column" paddingX={2}>
289
- <Text bold color="cyan">创建新任务 · 第 1 步:名称</Text>
293
+ <Text bold color="cyan">创建新任务</Text>
294
+ <Text color="gray">输入任务名称(不使用 git worktree)</Text>
290
295
  <TextInput value={name} onChange={setName} focused placeholder="命令行任务"
291
- onSubmit={() => setMode('create-wt')} />
292
- <Text color="gray">回车继续 · Esc 返回</Text>
293
- </Box>
294
- )
295
- }
296
- if (mode === 'create-wt') {
297
- return (
298
- <Box flexDirection="column" paddingX={2}>
299
- <Text bold color="cyan">创建新任务 · 第 2 步:是否使用 git worktree?</Text>
300
- <Select
301
- items={[{ label: '否(默认)', value: 'no' }, { label: '是', value: 'yes' }]}
302
- onSelect={v => onCreate(name, v === 'yes')} />
303
- <Text color="gray">回车确认 · Esc 返回</Text>
296
+ onSubmit={() => onCreate(name)} />
297
+ <Text color="gray">回车创建 · Esc 返回</Text>
304
298
  </Box>
305
299
  )
306
300
  }