Skip to content

Commit

Permalink
merge v0.7.4 and v0.7.5 changes back into main (#644)
Browse files Browse the repository at this point in the history
  • Loading branch information
sawka authored May 2, 2024
1 parent 5afe233 commit 9a82576
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 25 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"productName": "Wave",
"description": "An Open-Source, AI-Native, Terminal Built for Seamless Workflows",
"version": "0.7.3",
"version": "0.7.5",
"main": "dist/emain.js",
"license": "Apache-2.0",
"repository": {
Expand Down
20 changes: 10 additions & 10 deletions src/app/common/prompt/prompt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,16 +172,16 @@ class Prompt extends React.Component<
</span>
);
}
if (!isBlank(festate["K8SCONTEXT"])) {
const k8sContext = festate["K8SCONTEXT"];
const k8sNs = festate["K8SNAMESPACE"];
k8sElem = (
<span title="k8s context:namespace" className="term-prompt-k8s">
k8s:({k8sContext}
{isBlank(k8sNs) ? "" : ":" + k8sNs}){" "}
</span>
);
}
// if (!isBlank(festate["K8SCONTEXT"])) {
// const k8sContext = festate["K8SCONTEXT"];
// const k8sNs = festate["K8SNAMESPACE"];
// k8sElem = (
// <span title="k8s context:namespace" className="term-prompt-k8s">
// k8s:({k8sContext}
// {isBlank(k8sNs) ? "" : ":" + k8sNs}){" "}
// </span>
// );
// }
return (
<span className={termClassNames}>
{remoteElem} {cwdElem} {branchElem} {condaElem} {pythonElem} {k8sElem}
Expand Down
6 changes: 5 additions & 1 deletion src/app/workspace/cmdinput/infomsg.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ class InfoMsg extends React.Component<{}, {}> {
}

return (
<AuxiliaryCmdView title={titleStr} className="cmd-input-info">
<AuxiliaryCmdView
title={titleStr}
className="cmd-input-info"
onClose={() => GlobalModel.inputModel.closeAuxView()}
>
<If condition={infoMsg?.infomsg}>
<div key="infomsg" className="info-msg">
<If condition={infoMsg.infomsghtml}>
Expand Down
5 changes: 3 additions & 2 deletions src/app/workspace/cmdinput/textareainput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,9 @@ class TextAreaInput extends React.Component<{ screen: Screen; onHeightChange: ()
}
}
}

const renderCmdInputKeybindings = inputModel.shouldRenderAuxViewKeybindings(null);
const renderCmdInputKeybindings =
inputModel.shouldRenderAuxViewKeybindings(null) ||
inputModel.shouldRenderAuxViewKeybindings(appconst.InputAuxView_Info);
const renderHistoryKeybindings = inputModel.shouldRenderAuxViewKeybindings(appconst.InputAuxView_History);
return (
<div
Expand Down
2 changes: 0 additions & 2 deletions waveshell/pkg/shellapi/zshapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,8 +531,6 @@ for var in "${(@k)dis_functions_source}"; do
done
printf "[%SECTIONSEP%]";
[%GITBRANCH%]
[%K8SCONTEXT%]
[%K8SNAMESPACE%]
printf "[%SECTIONSEP%]";
print -P "$PS1"
printf "[%SECTIONSEP%]";
Expand Down
1 change: 0 additions & 1 deletion wavesrv/cmd/main-server.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,6 @@ func HandleRunEphemeralCommand(w http.ResponseWriter, r *http.Request) {
WriteJsonError(w, fmt.Errorf(ErrorDecodingJson, err))
return
}
log.Printf("Running ephemeral command: %v\n", commandPk)

if commandPk.EphemeralOpts == nil {
commandPk.EphemeralOpts = &ephemeral.EphemeralRunOpts{}
Expand Down
8 changes: 0 additions & 8 deletions wavesrv/pkg/remote/remote.go
Original file line number Diff line number Diff line change
Expand Up @@ -1930,10 +1930,6 @@ func RunCommand(ctx context.Context, rcOpts RunCommandOpts, runPacket *packet.Ru
return nil, nil, fmt.Errorf("runPacket.StatePtr should not be set, it is set in RunCommand")
}

if rcOpts.EphemeralOpts != nil {
log.Printf("[info] running ephemeral command ck: %s\n", runPacket.CK)
}

// pending state command logic
// if we are currently running a command that can change the state, we need to wait for it to finish
if rcOpts.StatePtr == nil {
Expand Down Expand Up @@ -2186,9 +2182,6 @@ func (wsh *WaveshellProc) HandleFeInput(inputPk *scpacket.FeInputPacketType) err
func (wsh *WaveshellProc) AddRunningCmd(rct *RunCmdType) {
wsh.Lock.Lock()
defer wsh.Lock.Unlock()
if rct.EphemeralOpts != nil {
log.Printf("[info] adding ephemeral running command: %s\n", rct.CK)
}
wsh.RunningCmds[rct.RunPacket.CK] = rct
}

Expand Down Expand Up @@ -2596,7 +2589,6 @@ func (wsh *WaveshellProc) handleDataPacket(rct *RunCmdType, dataPk *packet.DataP
return
}
if rct.EphemeralOpts != nil {
log.Printf("ephemeral data packet: %s\n", dataPk.CK)
// Write to the response writer if it's set
if len(realData) > 0 && rct.EphemeralOpts.ExpectsResponse {
switch dataPk.FdNum {
Expand Down

0 comments on commit 9a82576

Please sign in to comment.