Documentation
¶
Overview ¶
Package titlegen 为会话生成「即时兜底标题」(无 LLM)。
用途:用户发首条消息、harness 尚未生成标题前,先给侧栏一个可读标题。 真正的权威标题由 harness 生成、经 ACP session_info_update 推送或 session/list 读取; 本包只负责权威标题到达前的瞬时显示(去 markdown/命令/引号,截断 maxChars)。
归一化逻辑移植自 wesight (MIT):src/shared/cowork/sessionTitle.ts (buildSessionTitleContext / normalizeSessionTitleToPlainText)。
=== wesight MIT 版权声明 === Copyright (c) freestylefly (https://github.com/freestylefly/wesight) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildContext ¶
BuildContext 从原始输入抽取干净的上下文(去空行、压空白、限行限长)。
func FallbackTitle ¶
FallbackTitle 从用户输入即时生成纯文本标题(无 LLM),用于 harness 标题到达前的瞬时显示。
Types ¶
This section is empty.