feat(cli): show acting staff identity per enterprise
- hose-use whoami: 逐企业一行显示执行身份(姓名 + 工号 + 来源) - corps ls: 新增「员工姓名」列 - context/status 保持全局诊断
This commit is contained in:
1 parent
dda9b2c7a0
commit
a797196caa
6 files changed
+499
-423
No files matched your search
@@ -10,11 +10,17 @@ import { ApprovalRepository } from "../../domains/approval/index.js";
|
||||
import { VERSION } from "../../version.js";
|
||||
import { formatExpiresAt, formatSourceLabel, formatCorpEnvLabel, printJson } from "../printer.js";
|
||||
import type { CliParsedArgs, CliResult, CliRuntime } from "../types.js";
|
||||
import { handleWhoami } from "./corps/whoami.js";
|
||||
|
||||
export async function handleContextCommand(
|
||||
parsed: CliParsedArgs,
|
||||
runtime: CliRuntime
|
||||
): Promise<CliResult> {
|
||||
// `whoami` 输出按企业逐一列出当前执行身份;`context/status` 保留全局诊断。
|
||||
const invoked = (parsed.raw ?? []).find((arg) => !arg.startsWith("-"));
|
||||
if (invoked?.toLowerCase() === "whoami") {
|
||||
return handleWhoami(parsed, runtime);
|
||||
}
|
||||
const currentCorp = runtime.selectedCorp;
|
||||
const allCorps = runtime.corpContext.listCorps();
|
||||
const activeAccount = getActiveAccount();
|
||||
|
||||
Reference in new issue
Block a user