Q40: tasks choose a writing mode; house style applies to conversational work only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
645ce686bb
commit
7be072f8c5
18 files changed
+119
-41
No files matched your search
@@ -28,6 +28,10 @@ export const zh: Record<string, string> = {
|
||||
"Advanced": "高级",
|
||||
"Integrations": "集成密钥",
|
||||
"Document": "文档",
|
||||
"Writing": "写作方式",
|
||||
"Conversational (house style)": "日常沟通(公司文风)",
|
||||
"Technical spec": "技术规格",
|
||||
"Structured output": "结构化输出",
|
||||
"Applies to": "适用范围",
|
||||
"Category": "类别",
|
||||
"Content": "内容",
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { FormEvent } from "react";
|
||||
import { Dialog } from "../shared/Dialog";
|
||||
import { Field } from "../shared/ui";
|
||||
import type { AppSnapshot, RiskLevel, TaskPriority } from "../../../shared/domain";
|
||||
import { RISK_LEVEL, TASK_PRIORITY, TASK_STATUS } from "../../../shared/domain";
|
||||
import type { AppSnapshot, RiskLevel, TaskPriority, WritingMode } from "../../../shared/domain";
|
||||
import { RISK_LEVEL, TASK_PRIORITY, TASK_STATUS, WRITING_MODE } from "../../../shared/domain";
|
||||
import type { SnapshotActions } from "../app/useSnapshot";
|
||||
import { t } from "../i18n/i18n";
|
||||
|
||||
@@ -18,6 +18,12 @@ const PRIORITY_OPTIONS: ReadonlyArray<{ value: TaskPriority; label: string }> =
|
||||
{ value: TASK_PRIORITY.HIGH, label: t("High") },
|
||||
];
|
||||
|
||||
const WRITING_OPTIONS: ReadonlyArray<{ value: WritingMode; label: string }> = [
|
||||
{ value: WRITING_MODE.CONVERSATIONAL, label: t("Conversational (house style)") },
|
||||
{ value: WRITING_MODE.TECHNICAL, label: t("Technical spec") },
|
||||
{ value: WRITING_MODE.STRUCTURED, label: t("Structured output") },
|
||||
];
|
||||
|
||||
function value(form: FormData, key: string): string {
|
||||
return String(form.get(key) ?? "").trim();
|
||||
}
|
||||
@@ -59,6 +65,7 @@ export function NewTaskDialog({
|
||||
workspaceId: optional(form, "workspaceId"),
|
||||
priority: value(form, "priority") as TaskPriority,
|
||||
requiresFilesystem: form.get("requiresFilesystem") === "on",
|
||||
writingMode: value(form, "writingMode") as WritingMode,
|
||||
})).then((result) => {
|
||||
if (result) onClose();
|
||||
});
|
||||
@@ -102,6 +109,11 @@ export function NewTaskDialog({
|
||||
{PRIORITY_OPTIONS.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}
|
||||
</select>
|
||||
</Field>
|
||||
<Field label={t("Writing")}>
|
||||
<select className="input" name="writingMode" defaultValue={WRITING_MODE.CONVERSATIONAL}>
|
||||
{WRITING_OPTIONS.map((option) => <option key={option.value} value={option.value}>{option.label}</option>)}
|
||||
</select>
|
||||
</Field>
|
||||
<label className="checkbox-row">
|
||||
<input type="checkbox" name="requiresFilesystem" /> {t("Requires workspace access")}
|
||||
</label>
|
||||
|
||||
Reference in new issue
Block a user