release: ship v1.5.0 with on-device writing suggestions
Adds next-sentence suggestions while typing, weekly input insights and a personal phrase memory to the desktop app, and fixes custom instructions so they process the text instead of inserting the instruction's own wording. Local model requests are now bounded and individually cancellable. Bumps the product version to 1.5.0 (Android/iOS build 1050000), refreshes the landing and web download links, and records the new INPUT feature rows and the open verification gaps in the infrastructure map.
This commit is contained in:
parent
99f06c253c
commit
5c11ee2fde
104 changed files with 14410 additions and 174 deletions
|
|
@ -143,3 +143,98 @@ export function resolveSystemPrompt(
|
|||
}
|
||||
|
||||
export { BASE_SYSTEM_PROMPTS }
|
||||
|
||||
// ============================================================
|
||||
// 다음 문장 제안 (ghost text) — 프롬프트 정본
|
||||
// ============================================================
|
||||
|
||||
/**
|
||||
* 추론 모델이 `thinking` 블록을 지 않게 하는 prefix.
|
||||
*
|
||||
* `LocalLLMService.processText` 가 같은 목적으로 쓰는 값과 같다. 제안 경로는
|
||||
* `streamGenerate` 를 직접 부르므로 여기서 직접 붙인다.
|
||||
*/
|
||||
export const SUGGESTION_NO_THINK_PREFIX = '/no_think'
|
||||
|
||||
/**
|
||||
* 제안 시스템 프롬프트.
|
||||
*
|
||||
* 지시문은 **시스템 프롬프트에만** 둔다. 지시문이 처리 대상 텍스트 자리에 들어가
|
||||
* 지시문 자체를 다듬어 돌려주던 회귀(밋 9c2b4d4)와 같은 부류의 사고를 막는다.
|
||||
*/
|
||||
const SUGGESTION_SYSTEM_PROMPT = `사용자가 지금 입력창에 글을 쓰는 중입니다. 사용자가 마지막으로 쓴 글 뒤에 이어질 다음 문장을 제안하세요.
|
||||
|
||||
규칙:
|
||||
- 사용자가 언어와 같은 언어로 쓰세요.
|
||||
- 사용자의 말투와 문체를 유지하세요. 존댓말/반말, 격식/비격식을 바꾸지 마세요.
|
||||
- 이미 나온 단어를 되풀이하지 말고 이어지는 내용만 쓰세요.
|
||||
- 후보를 한 줄에 하나씩, 번호나 따옴표, 설명 없이 출력하세요.
|
||||
- 각 후보는 한 문장, 최대 {{maxChars}}자입니다.
|
||||
- 확신이 없으면 짧게 쓰세요. 리말, 요약, 빈 줄을 출력하지 마세요.`
|
||||
|
||||
export interface SuggestionPromptInput {
|
||||
/** 어렛 앞까지의 텍스트 */
|
||||
prefix: string
|
||||
/** 활성 앱/창 (맥락 트) */
|
||||
appName?: string | null
|
||||
windowTitle?: string | null
|
||||
/** 사용자가 자주 쓰는 표현 (개인화 힌트) */
|
||||
phraseHints?: readonly string[]
|
||||
/**
|
||||
* 과거에 같은 꼬리 뒤에 실제로 이어 쓴 문장 (개인 기억).
|
||||
*
|
||||
* 자주 쓰는 표현보다 훨씬 강한 문맥 신호다 — 사용자 자신의 실제 이어쓰기다.
|
||||
*/
|
||||
continuationHints?: readonly string[]
|
||||
/** 후보 개수 */
|
||||
candidates?: number
|
||||
/** 후보당 최대 길이 */
|
||||
maxChars?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* 제안 요청용 (systemPrompt, text) 를 만든다.
|
||||
*
|
||||
* 시스템 프롬프트에 지시문, 사용자 메시지에는 **지금까지 쓴 텍스트와 맥락**만 는다.
|
||||
*/
|
||||
export function buildSuggestionPrompt(input: SuggestionPromptInput): {
|
||||
systemPrompt: string
|
||||
text: string
|
||||
} {
|
||||
const candidates = Math.max(1, Math.min(input.candidates ?? 3, 5))
|
||||
const maxChars = Math.max(20, Math.min(input.maxChars ?? 160, 400))
|
||||
|
||||
const sections: string[] = ['[지금까지 텍스트]', input.prefix]
|
||||
|
||||
if (input.phraseHints && input.phraseHints.length > 0) {
|
||||
sections.push('', '[자주 쓰는 표현]')
|
||||
for (const hint of input.phraseHints.slice(0, 5)) {
|
||||
sections.push(`- ${hint}`)
|
||||
}
|
||||
}
|
||||
|
||||
if (input.appName || input.windowTitle) {
|
||||
sections.push('', '[현재 앱]')
|
||||
const app = [input.appName, input.windowTitle].filter(Boolean).join(' — ')
|
||||
sections.push(app)
|
||||
}
|
||||
|
||||
if (input.continuationHints && input.continuationHints.length > 0) {
|
||||
sections.push('', '[과거에 사용자가 비슷한 문장 뒤에 실제로 이어 쓴 내용]')
|
||||
for (const hint of input.continuationHints.slice(0, 3)) {
|
||||
sections.push(`- ${hint}`)
|
||||
}
|
||||
sections.push('위 내용은 문체와 맥락 참고용입니다. 그대로 복사하지 말고 이어질 문장을 새로 쓰세요.')
|
||||
}
|
||||
|
||||
sections.push('', `이어질 다음 문장 ${candidates}개를 한 줄씩 출력하세요.`)
|
||||
|
||||
const systemPrompt = `${SUGGESTION_NO_THINK_PREFIX}\n${SUGGESTION_SYSTEM_PROMPT.replace(
|
||||
'{{maxChars}}',
|
||||
String(maxChars)
|
||||
)}`
|
||||
|
||||
return { systemPrompt, text: sections.join('\n') }
|
||||
}
|
||||
|
||||
export { SUGGESTION_SYSTEM_PROMPT }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue