-
- Run Text Pipeline
-
-
- Run Audio Pipeline
-
+ ${this._pipelineRuns.length === 0
+ ? html`
+
+ Run Text Pipeline
+
+
+ Run Audio Pipeline
+
+ `
+ : this._pipelineRuns[0].init_options.start_stage === "intent"
+ ? html`
+
+
+ Send
+
+ `
+ : html`
+
+
+
+ `}
- ${this._pipelineRun
- ? html`
-
-
-
-
Run
-
${this._pipelineRun.stage}
-
-
- ${renderData(this._pipelineRun.run, RUN_DATA)}
-
-
-
- ${maybeRenderError(this._pipelineRun, "ready", lastRunStage)}
- ${hasStage(this._pipelineRun, "stt")
- ? html`
-
-
-
- Speech-to-Text
- ${renderProgress(
- this.hass,
- this._pipelineRun,
- "stt"
- )}
-
- ${this._pipelineRun.stt
- ? html`
-
- ${renderData(this._pipelineRun.stt, STT_DATA)}
- ${dataMinusKeysRender(
- this._pipelineRun.stt,
- STT_DATA
- )}
-
- `
- : ""}
-
- ${this._pipelineRun.stage === "stt" &&
- this._stopRecording
- ? html`
-
-
- Stop Recording
-
-
- `
- : ""}
-
- `
- : ""}
- ${maybeRenderError(this._pipelineRun, "stt", lastRunStage)}
- ${hasStage(this._pipelineRun, "intent")
- ? html`
-
-
-
- Natural Language Processing
- ${renderProgress(
- this.hass,
- this._pipelineRun,
- "intent"
- )}
-
- ${this._pipelineRun.intent
- ? html`
-
- ${renderData(
- this._pipelineRun.intent,
- INTENT_DATA
- )}
- ${dataMinusKeysRender(
- this._pipelineRun.intent,
- INTENT_DATA
- )}
-
- `
- : ""}
-
-
- `
- : ""}
- ${maybeRenderError(this._pipelineRun, "intent", lastRunStage)}
- ${hasStage(this._pipelineRun, "tts")
- ? html`
-
-
-
- Text-to-Speech
- ${renderProgress(
- this.hass,
- this._pipelineRun,
- "tts"
- )}
-
- ${this._pipelineRun.tts
- ? html`
-
- ${renderData(this._pipelineRun.tts, TTS_DATA)}
-
- `
- : ""}
-
- ${this._pipelineRun?.tts?.tts_output
- ? html`
-
-
- Play Audio
-
-
- `
- : ""}
-
- `
- : ""}
- ${maybeRenderError(this._pipelineRun, "tts", lastRunStage)}
-
-
- Raw
- ${JSON.stringify(this._pipelineRun, null, 2)}
-
-
- `
- : ""}
+ ${this._pipelineRuns.map((run) =>
+ run === null
+ ? ""
+ : html`
+
+ `
+ )}