Cline Surface
CLI
Cline Version
3.0.31
Beta version
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, "<") |
|
.replace(/>/g, ">") |
|
.replace(/"/g, """) |
|
.replace(/'/g, "'"); |
|
} |
|
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
cline "use run_commands run echo hello"
- use
cline h and → to export
- 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
Cline Surface
CLI
Cline Version
3.0.31
Beta version
What happened?
because:
cline/apps/cli/src/session/export.ts
Lines 882 to 889 in c7de31a
cline/apps/cli/src/session/export.ts
Lines 851 to 858 in c7de31a
Here,
cmdis not a string. (maybe it is a string for sometime)it is an object
{ "command": "cmd", "args": [ "/c", "dir" ] }Steps to reproduce
cline "use run_commands run echo hello"cline hand → to exportProvider/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