init
This commit is contained in:
commit
ec53fcbe95
1905 changed files with 513762 additions and 0 deletions
16
commands/extra-usage/extra-usage-noninteractive.ts
Normal file
16
commands/extra-usage/extra-usage-noninteractive.ts
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import { runExtraUsage } from './extra-usage-core.js'
|
||||
|
||||
export async function call(): Promise<{ type: 'text'; value: string }> {
|
||||
const result = await runExtraUsage()
|
||||
|
||||
if (result.type === 'message') {
|
||||
return { type: 'text', value: result.value }
|
||||
}
|
||||
|
||||
return {
|
||||
type: 'text',
|
||||
value: result.opened
|
||||
? `Browser opened to manage extra usage. If it didn't open, visit: ${result.url}`
|
||||
: `Please visit ${result.url} to manage extra usage.`,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue