@electerm/electerm-react 1.101.16 → 1.101.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -42,7 +42,7 @@ export default function createTitle (res, hide = true) {
42
42
  ) {
43
43
  f = `[T]${f}`
44
44
  }
45
- if (type) {
45
+ if (type && type !== 'ssh') {
46
46
  f = `[${type}]${f}`
47
47
  }
48
48
  return f || e(terminalLocalType)
@@ -35,7 +35,25 @@ export default function AIOutput ({ item }) {
35
35
  }
36
36
 
37
37
  const runInTerminal = () => {
38
- window.store.runCommandInTerminal(code)
38
+ // Filter out comments from the code before running
39
+ const filteredCode = code
40
+ .split('\n')
41
+ .map(line => line.trim())
42
+ .filter(line => {
43
+ // Remove empty lines and comments
44
+ if (!line) {
45
+ return false
46
+ }
47
+ if (line.startsWith('#')) {
48
+ return false
49
+ }
50
+ return true
51
+ })
52
+ .join('\n') // Join multiple commands with &&
53
+
54
+ if (filteredCode) {
55
+ window.store.runCommandInTerminal(filteredCode)
56
+ }
39
57
  }
40
58
 
41
59
  return (
@@ -270,12 +270,13 @@ export const sshAuthFields = [
270
270
  // Telnet auth fields - similar to SSH but with filtered auth types (no privateKey)
271
271
  export const telnetAuthFields = [
272
272
  commonFields.category,
273
+ commonFields.title,
273
274
  commonFields.host,
274
275
  commonFields.username,
275
276
  commonFields.password,
276
277
  { type: 'profileItem', name: '__profile__', label: '', profileFilter: d => !isEmpty(d.telnet) },
277
278
  commonFields.port,
278
- commonFields.title,
279
+ commonFields.runScripts,
279
280
  commonFields.description,
280
281
  commonFields.setEnv,
281
282
  commonFields.startDirectoryLocal,
@@ -45,6 +45,7 @@ const serialConfig = {
45
45
  { type: 'switch', name: 'xon', label: 'xon', valuePropName: 'checked' },
46
46
  { type: 'switch', name: 'xoff', label: 'xoff', valuePropName: 'checked' },
47
47
  { type: 'switch', name: 'xany', label: 'xany', valuePropName: 'checked' },
48
+ commonFields.runScripts,
48
49
  commonFields.description,
49
50
  { type: 'input', name: 'type', label: 'type', hidden: true }
50
51
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@electerm/electerm-react",
3
- "version": "1.101.16",
3
+ "version": "1.101.20",
4
4
  "description": "react components src for electerm",
5
5
  "main": "./client/components/main/main.jsx",
6
6
  "license": "MIT",