Skip to content

Error on exporting history: i.replace is not a function #11942

Description

@Dave-12138

Cline Surface

CLI

Cline Version

3.0.31

Beta version

  • I am using a beta version of Cline

What happened?

> cline h export somesessionid
error: i.replace is not a function. (In 'i.replace(/&/g,"&")', 'i.replace' is undefined)

because:

function escapeHtml(text: string): string {
return text
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;")
.replace(/"/g, "&quot;")
.replace(/'/g, "&#039;");
}

return commands
.map(
(cmd, i) => `
<div class="command-block">
<div class="command-label">Command ${i + 1}</div>
<code>${escapeHtml(cmd)}</code>
</div>
`,

Here, cmd is not a string. (maybe it is a string for sometime)
it is an object

{
  "command": "cmd",
  "args": [
    "/c",
    "dir"
  ]
}

Steps to reproduce

  1. cline "use run_commands run echo hello"
  2. use cline h and to export
  3. got error

Provider/Model

No response

IDE / CLI Diagnostics

No response

System Information

System:
OS: Windows 11 10.0.26200
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 6.66 GB / 23.86 GB
Binaries:
Node: 26.4.0 - C:\Program Files\nodejs\node.EXE
npm: 11.17.0 - C:\Program Files\nodejs\npm.CMD

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Cline CLI

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions