This repository was archived by the owner on Jul 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 16
16
17
17
import Debug from 'debug'
18
18
import store from './store'
19
- import KResponse from './command'
20
- import { ResponseType } from '../repl/events'
21
19
22
20
/** Legacy localStorage key for long-time Kui users */
23
21
const legacyKey = 'openwhisk.history'
@@ -36,14 +34,6 @@ type FilterFunction = (line: HistoryLine) => boolean
36
34
export interface HistoryLine {
37
35
/** The raw command line */
38
36
raw : string
39
-
40
- /** The output of that command line's execution */
41
- response ?: KResponse
42
- responseType ?: ResponseType
43
- execUUID ?: string
44
-
45
- /** Index into model */
46
- historyIdx : number
47
37
}
48
38
49
39
/** A tuple of History entries, one per Tab (as specified by its given uuid) */
@@ -154,9 +144,9 @@ export class HistoryModel {
154
144
155
145
/** add a line of repl history */
156
146
public add ( line : Pick < HistoryLine , 'raw' > ) : number {
157
- if ( this . _lines . length === 0 || JSON . stringify ( this . _lines [ this . _lines . length - 1 ] ) !== JSON . stringify ( line ) ) {
147
+ if ( this . _lines . length === 0 || this . _lines [ this . _lines . length - 1 ] . raw !== line . raw ) {
158
148
// don't add sequential duplicates
159
- this . _lines . push ( Object . assign ( line , { historyIdx : this . _lines . length - 1 } ) )
149
+ this . _lines . push ( line )
160
150
this . save ( )
161
151
// console.log('history::add', cursor)
162
152
}
You can’t perform that action at this time.
0 commit comments