Ghostwriter Introduced (#166)
* initlal commit * Ghostwriter always enabled * rename code * ghostwriter panel * separate component * ui improvements * single thread * copy improvement * dont pop up keyboard shortcuts * markdown renderer * ghostwriter button placement * better UX * ghostwriter copy * meta shortcut * better settings menu * formatting * doocumentation * add tests * race condition * race condition 2 * pass title * more comments * comments * formtting
This commit is contained in:
@@ -54,6 +54,10 @@ export const updateSettingsSchema = z
|
||||
.optional(),
|
||||
jobspyCountryIndeed: z.string().trim().max(100).nullable().optional(),
|
||||
showSponsorInfo: z.boolean().nullable().optional(),
|
||||
chatStyleTone: z.string().trim().max(100).nullable().optional(),
|
||||
chatStyleFormality: z.string().trim().max(100).nullable().optional(),
|
||||
chatStyleConstraints: z.string().trim().max(4000).nullable().optional(),
|
||||
chatStyleDoNotUse: z.string().trim().max(1000).nullable().optional(),
|
||||
rxresumeEmail: z.string().trim().max(200).nullable().optional(),
|
||||
rxresumePassword: z.string().trim().max(2000).nullable().optional(),
|
||||
basicAuthUser: z.string().trim().max(200).nullable().optional(),
|
||||
|
||||
@@ -179,6 +179,18 @@ export const createAppSettings = (
|
||||
showSponsorInfo: true,
|
||||
defaultShowSponsorInfo: true,
|
||||
overrideShowSponsorInfo: null,
|
||||
chatStyleTone: "professional",
|
||||
defaultChatStyleTone: "professional",
|
||||
overrideChatStyleTone: null,
|
||||
chatStyleFormality: "medium",
|
||||
defaultChatStyleFormality: "medium",
|
||||
overrideChatStyleFormality: null,
|
||||
chatStyleConstraints: "",
|
||||
defaultChatStyleConstraints: "",
|
||||
overrideChatStyleConstraints: null,
|
||||
chatStyleDoNotUse: "",
|
||||
defaultChatStyleDoNotUse: "",
|
||||
overrideChatStyleDoNotUse: null,
|
||||
llmApiKeyHint: null,
|
||||
rxresumeEmail: null,
|
||||
rxresumePasswordHint: null,
|
||||
|
||||
@@ -620,6 +620,102 @@ export interface BulkJobActionResponse {
|
||||
results: BulkJobActionResult[];
|
||||
}
|
||||
|
||||
export const JOB_CHAT_MESSAGE_ROLES = [
|
||||
"system",
|
||||
"user",
|
||||
"assistant",
|
||||
"tool",
|
||||
] as const;
|
||||
export type JobChatMessageRole = (typeof JOB_CHAT_MESSAGE_ROLES)[number];
|
||||
|
||||
export const JOB_CHAT_MESSAGE_STATUSES = [
|
||||
"complete",
|
||||
"partial",
|
||||
"cancelled",
|
||||
"failed",
|
||||
] as const;
|
||||
export type JobChatMessageStatus = (typeof JOB_CHAT_MESSAGE_STATUSES)[number];
|
||||
|
||||
export const JOB_CHAT_RUN_STATUSES = [
|
||||
"running",
|
||||
"completed",
|
||||
"cancelled",
|
||||
"failed",
|
||||
] as const;
|
||||
export type JobChatRunStatus = (typeof JOB_CHAT_RUN_STATUSES)[number];
|
||||
|
||||
export interface JobChatThread {
|
||||
id: string;
|
||||
jobId: string;
|
||||
title: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
lastMessageAt: string | null;
|
||||
}
|
||||
|
||||
export interface JobChatMessage {
|
||||
id: string;
|
||||
threadId: string;
|
||||
jobId: string;
|
||||
role: JobChatMessageRole;
|
||||
content: string;
|
||||
status: JobChatMessageStatus;
|
||||
tokensIn: number | null;
|
||||
tokensOut: number | null;
|
||||
version: number;
|
||||
replacesMessageId: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface JobChatRun {
|
||||
id: string;
|
||||
threadId: string;
|
||||
jobId: string;
|
||||
status: JobChatRunStatus;
|
||||
model: string | null;
|
||||
provider: string | null;
|
||||
errorCode: string | null;
|
||||
errorMessage: string | null;
|
||||
startedAt: number;
|
||||
completedAt: number | null;
|
||||
requestId: string | null;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export type JobChatStreamEvent =
|
||||
| {
|
||||
type: "ready";
|
||||
runId: string;
|
||||
threadId: string;
|
||||
messageId: string;
|
||||
requestId: string;
|
||||
}
|
||||
| {
|
||||
type: "delta";
|
||||
runId: string;
|
||||
messageId: string;
|
||||
delta: string;
|
||||
}
|
||||
| {
|
||||
type: "completed";
|
||||
runId: string;
|
||||
message: JobChatMessage;
|
||||
}
|
||||
| {
|
||||
type: "cancelled";
|
||||
runId: string;
|
||||
message: JobChatMessage;
|
||||
}
|
||||
| {
|
||||
type: "error";
|
||||
runId: string;
|
||||
code: string;
|
||||
message: string;
|
||||
requestId: string;
|
||||
};
|
||||
|
||||
// Visa Sponsors types
|
||||
export interface VisaSponsor {
|
||||
organisationName: string;
|
||||
@@ -817,6 +913,18 @@ export interface AppSettings {
|
||||
showSponsorInfo: boolean;
|
||||
defaultShowSponsorInfo: boolean;
|
||||
overrideShowSponsorInfo: boolean | null;
|
||||
chatStyleTone: string;
|
||||
defaultChatStyleTone: string;
|
||||
overrideChatStyleTone: string | null;
|
||||
chatStyleFormality: string;
|
||||
defaultChatStyleFormality: string;
|
||||
overrideChatStyleFormality: string | null;
|
||||
chatStyleConstraints: string;
|
||||
defaultChatStyleConstraints: string;
|
||||
overrideChatStyleConstraints: string | null;
|
||||
chatStyleDoNotUse: string;
|
||||
defaultChatStyleDoNotUse: string;
|
||||
overrideChatStyleDoNotUse: string | null;
|
||||
llmApiKeyHint: string | null;
|
||||
rxresumeEmail: string | null;
|
||||
rxresumePasswordHint: string | null;
|
||||
|
||||
Reference in New Issue
Block a user