Skip to content

在 Windows 桌面端中,使用某些 skill / tool 任务后,会在会话列表里额外出现一个或多个名为 (session) 的对话。 #5244

Description

@wat4me

What happened?

  • 桌面端会话列表中出现额外的 (session) 会话
  • 这些会话不是用户主动创建的
  • 打开后没有正常聊天内容
  • 部分记录只有工具调用、执行记录,或几乎为空
  • 主要在执行 skill / tool 相关任务后出现
Image Image Image

打包后的代码,发现路径展开逻辑只处理了 Unix 风格的 ~/,没有处理 Windows 风格的 ~\

大致逻辑类似:

if (expanded === "~") {
  return home
}

if (expanded.startsWith("~/")) {
  expanded = path.join(home, expanded.slice(2))
}

但 Windows 上可能会出现:

~\Documents\...
~\.craft-agent\...

这种路径不会被 expanded.startsWith("~/") 命中,于是会被当成普通相对路径处理,最后落到应用当前工作目录下面。

What did you expect to happen?

  • Windows 下 ~\... 应该和 ~/... 一样正确展开到用户 home
  • 应用安装目录下不应该创建字面量 ~ 目录
  • messageCount: 0 且没有 preview / prompt / title 的外部 session 不应该显示在主会话列表中
  • skill / tool 产生的内部 session 或空 session 不应该被展示成用户可见的普通对话

Client information

Desktop v0.04

Login information

No response

Anything else we need to know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions