mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-24 09:46:36 +00:00
Remove attribution from Assist dialog (#17038)
This commit is contained in:
parent
d169ff6a96
commit
d656269d75
@ -52,10 +52,6 @@ export interface ConversationResult {
|
||||
| IntentResultError;
|
||||
}
|
||||
|
||||
export interface AgentInfo {
|
||||
attribution?: { name: string; url: string };
|
||||
}
|
||||
|
||||
export interface Agent {
|
||||
id: string;
|
||||
name: string;
|
||||
@ -87,15 +83,6 @@ export const listAgents = (
|
||||
country,
|
||||
});
|
||||
|
||||
export const getAgentInfo = (
|
||||
hass: HomeAssistant,
|
||||
agent_id?: string
|
||||
): Promise<AgentInfo> =>
|
||||
hass.callWS({
|
||||
type: "conversation/agent/info",
|
||||
agent_id,
|
||||
});
|
||||
|
||||
export const prepareConversation = (
|
||||
hass: HomeAssistant,
|
||||
language?: string
|
||||
|
@ -35,7 +35,6 @@ import {
|
||||
listAssistPipelines,
|
||||
runAssistPipeline,
|
||||
} from "../../data/assist_pipeline";
|
||||
import { AgentInfo, getAgentInfo } from "../../data/conversation";
|
||||
import { haStyleDialog } from "../../resources/styles";
|
||||
import type { HomeAssistant } from "../../types";
|
||||
import { AudioRecorder } from "../../util/audio-recorder";
|
||||
@ -66,8 +65,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
||||
|
||||
@state() private _pipeline?: AssistPipeline;
|
||||
|
||||
@state() private _agentInfo?: AgentInfo;
|
||||
|
||||
@state() private _showSendButton = false;
|
||||
|
||||
@state() private _pipelines?: AssistPipeline[];
|
||||
@ -115,7 +112,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
||||
this._opened = false;
|
||||
this._pipeline = undefined;
|
||||
this._pipelines = undefined;
|
||||
this._agentInfo = undefined;
|
||||
this._conversation = undefined;
|
||||
this._conversationId = null;
|
||||
this._audioRecorder?.close();
|
||||
@ -265,17 +261,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
||||
`}
|
||||
</span>
|
||||
</ha-textfield>
|
||||
${this._agentInfo && this._agentInfo.attribution
|
||||
? html`
|
||||
<a
|
||||
href=${this._agentInfo.attribution.url}
|
||||
class="attribution"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>${this._agentInfo.attribution.name}</a
|
||||
>
|
||||
`
|
||||
: ""}
|
||||
</div>
|
||||
</ha-dialog>
|
||||
`;
|
||||
@ -298,12 +283,7 @@ export class HaVoiceCommandDialog extends LitElement {
|
||||
if (e.code === "not_found") {
|
||||
this._pipelineId = undefined;
|
||||
}
|
||||
return;
|
||||
}
|
||||
this._agentInfo = await getAgentInfo(
|
||||
this.hass,
|
||||
this._pipeline.conversation_engine
|
||||
);
|
||||
}
|
||||
|
||||
private async _loadPipelines() {
|
||||
@ -728,12 +708,6 @@ export class HaVoiceCommandDialog extends LitElement {
|
||||
flex: 1 0;
|
||||
padding: 4px;
|
||||
}
|
||||
.attribution {
|
||||
display: block;
|
||||
color: var(--secondary-text-color);
|
||||
padding-top: 4px;
|
||||
margin-bottom: -8px;
|
||||
}
|
||||
.messages {
|
||||
display: block;
|
||||
height: 400px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user