Q173: agents work in the company's or task's language, not the display language

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-09 04:40:52 -04:00
1 parent 538d834647
commit 3f14e3f706
36 files changed
+268 -105

No files matched your search

@@ -0,0 +1,9 @@
// Agents' working language belongs to the company (and optionally a task), not to the app's display language; companies keep what they had.
export const workLanguageSchema = `
alter table organizations add column work_language text not null default 'en' check (work_language in ('en', 'zh'));
update organizations set work_language = coalesce((select case when language = 'zh' then 'zh' else 'en' end from app_state where id = 1), 'en');
alter table tasks add column work_language text check (work_language is null or work_language in ('en', 'zh'));
insert into schema_migrations(version, name, applied_at)
values (104, 'work_language', datetime('now'));
`;
+2
View File
@@ -102,6 +102,7 @@ import { chatReplyRequestsSchema } from "./migrations/100-chat-reply-requests";
import { taskBlockedSchema } from "./migrations/101-task-blocked";
import { goalDueDateSchema } from "./migrations/102-goal-due-date";
import { workVerdictsSchema } from "./migrations/103-work-verdicts";
import { workLanguageSchema } from "./migrations/104-work-language";
interface Migration {
version: number;
@@ -213,6 +214,7 @@ const MIGRATIONS: Migration[] = [
{ version: 101, name: "task_blocked", sql: taskBlockedSchema },
{ version: 102, name: "goal_due_date", sql: goalDueDateSchema },
{ version: 103, name: "work_verdicts", sql: workVerdictsSchema },
{ version: 104, name: "work_language", sql: workLanguageSchema },
];
const SCHEMA_VERSION = MIGRATIONS[MIGRATIONS.length - 1].version;