File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { generatePKCE } from "@openauthjs/openauth/pkce"
22import { Global } from "../global"
33import path from "path"
4+ import fs from "fs/promises"
5+ import type { BunFile } from "bun"
46
57export namespace AuthAnthropic {
68 const CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e"
@@ -45,7 +47,9 @@ export namespace AuthAnthropic {
4547 } ) ,
4648 } )
4749 if ( ! result . ok ) throw new ExchangeFailed ( )
48- await Bun . write ( path . join ( Global . Path . data , "anthropic.json" ) , result )
50+ const file = Bun . file ( path . join ( Global . Path . data , "anthropic.json" ) )
51+ await Bun . write ( file , result )
52+ await fs . chmod ( file . name ! , 0o600 )
4953 }
5054
5155 export async function access ( ) {
Original file line number Diff line number Diff line change @@ -82,6 +82,8 @@ export const RunCommand = {
8282 printEvent ( UI . Style . TEXT_INFO_BOLD , "Read" , args . filePath )
8383 if ( tool === "opencode_write" )
8484 printEvent ( UI . Style . TEXT_SUCCESS_BOLD , "Create" , args . filePath )
85+ if ( tool === "opencode_list" )
86+ printEvent ( UI . Style . TEXT_INFO_BOLD , "List" , args . path )
8587 if ( tool === "opencode_glob" )
8688 printEvent (
8789 UI . Style . TEXT_INFO_BOLD ,
You can’t perform that action at this time.
0 commit comments