Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion client/src/lib/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Update this file with every code change / git commit.
*/

export const APP_VERSION = "0.27.15";
export const APP_VERSION = "0.27.16";

export interface ReleaseNote {
version: string;
Expand All @@ -18,6 +18,13 @@ export interface ReleaseNote {
}

export const RELEASE_NOTES: ReleaseNote[] = [
{
version: "0.27.16",
date: "2026-03-20",
changes: [
"Increase document limit to 250K characters — write instruction, context builder, and analysis endpoints all support much larger documents",
],
},
{
version: "0.27.15",
date: "2026-03-13",
Expand Down
8 changes: 4 additions & 4 deletions server/context-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ export {

/** Default truncation limits — one place to change them */
export const LIMITS = {
document: 8000,
documentShort: 6000,
documentBrief: 2000,
documentFull: 50000,
document: 250_000,
documentShort: 100_000,
documentBrief: 20_000,
documentFull: 250_000,
reference: 500,
wireframe: 3000,
historyEntries: 5,
Expand Down
6 changes: 3 additions & 3 deletions server/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@ You MUST respond with ONLY valid JSON in this exact format (no markdown, no expl
const challengeAppConfig = getAppTypeConfig(challengeAppType);
const challengeAppContext = formatAppTypeContext(challengeAppType);

const MAX_ANALYSIS_LENGTH = 8000;
const MAX_ANALYSIS_LENGTH = 250_000;
const analysisText = docText.slice(0, MAX_ANALYSIS_LENGTH);

// Resolve personas — use effective (DB override + code default), fall back to built-in
Expand Down Expand Up @@ -1144,7 +1144,7 @@ Output only valid JSON, no markdown.`,
const appConfig = getAppTypeConfig(appType);
const appContext = formatAppTypeContext(appType);

const MAX_ANALYSIS_LENGTH = 6000;
const MAX_ANALYSIS_LENGTH = 250_000;
const analysisText = docText.slice(0, MAX_ANALYSIS_LENGTH);

// Build discussion history context if available
Expand Down Expand Up @@ -4374,7 +4374,7 @@ ${docText ? `CURRENT DOCUMENT:\n${docText.slice(0, 3000)}\n\n` : ""}INTERVIEW Q&
const askAppConfig = getAppTypeConfig(askAppType);
const askAppContext = formatAppTypeContext(askAppType);

const MAX_DOC_LENGTH = 6000;
const MAX_DOC_LENGTH = 250_000;
const analysisText = docText.slice(0, MAX_DOC_LENGTH);

// Build session context section from pinned documents / captured items
Expand Down
2 changes: 1 addition & 1 deletion shared/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ export const writeRequestSchema = z.object({
selectedText: z.string().max(50_000).optional(),

// Intent (required - what user wants)
instruction: z.string().min(1, "Instruction is required").max(5_000),
instruction: z.string().min(1, "Instruction is required").max(250_000),

// Context (optional - additional grounding)
provocation: provocationContextSchema.optional(),
Expand Down
8 changes: 4 additions & 4 deletions tests/unit/server/context-builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,10 +343,10 @@ describe("buildContext", () => {
// ---------------------------------------------------------------------------
describe("LIMITS", () => {
it("has expected defaults", () => {
expect(LIMITS.document).toBe(8000);
expect(LIMITS.documentShort).toBe(6000);
expect(LIMITS.documentBrief).toBe(2000);
expect(LIMITS.documentFull).toBe(50000);
expect(LIMITS.document).toBe(250_000);
expect(LIMITS.documentShort).toBe(100_000);
expect(LIMITS.documentBrief).toBe(20_000);
expect(LIMITS.documentFull).toBe(250_000);
expect(LIMITS.reference).toBe(500);
expect(LIMITS.wireframe).toBe(3000);
expect(LIMITS.historyEntries).toBe(5);
Expand Down
Loading