feat: currentAuthor() carries git user.email — fail-open identity (F5 SLICE-2, #14)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import * as vscode from "vscode";
|
||||
import { CoauthorStore } from "./store";
|
||||
import { emptyArtifact, type Artifact, type Provenance } from "./model";
|
||||
import { buildFingerprint, resolve, shift, type OffsetRange } from "./anchorer";
|
||||
import { gitUserEmail } from "./identity";
|
||||
import { addThread, appendMessage, setStatus } from "./threadModel";
|
||||
|
||||
/** Test-facing snapshot of what is currently rendered for a document. */
|
||||
@@ -72,7 +73,8 @@ export class ThreadController implements vscode.Disposable {
|
||||
|
||||
private currentAuthor(): Provenance {
|
||||
const id = vscode.workspace.getConfiguration("git").get<string>("user.name") || process.env.USER || "human";
|
||||
return { kind: "human", id };
|
||||
const email = gitUserEmail(this.rootDir);
|
||||
return { kind: "human", id, ...(email !== undefined ? { email } : {}) };
|
||||
}
|
||||
|
||||
private persist(state: DocState): void {
|
||||
|
||||
Reference in New Issue
Block a user