Skip to content

Commit

Permalink
Remove inputValue bits. (#313)
Browse files Browse the repository at this point in the history
  • Loading branch information
dglazkov authored Apr 17, 2024
1 parent 7cdc1dd commit 04da6e0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ export class Conversation extends LitElement {
@property()
items: ConversationItem[] | null = null;

@property()
inputValue = "";

static styles = css`
* {
box-sizing: border-box;
Expand Down Expand Up @@ -314,7 +311,6 @@ export class Conversation extends LitElement {
required
name="message"
id="message"
value=${this.inputValue}
placeholder="Talk to the team"
/>
<input type="submit" />
Expand Down
15 changes: 0 additions & 15 deletions seeds/team-experiments/src/ui/elements/team-job/team-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ export class TeamJob extends LitElement {
@state()
conversation: ConversationItem[] = [];

// This is kind of gross. I only need it to shuttle sample input over.
@state()
inputValue = "";

static styles = css`
:host {
display: grid;
Expand Down Expand Up @@ -96,15 +92,6 @@ export class TeamJob extends LitElement {
});
}
});
this.#run.addEventListener("input", (e) => {
// Nasty stuff. Should I use like, inspector API here?
// Note, this diving into schema and the whole
// this.inputValue is only needed to grab sample
// input text, so that I can just click "Enter" without
// typing anything in.
const schema = e.data.inputArguments.schema;
this.inputValue = schema?.properties?.text.examples?.[0] || "";
});
this.#run.addEventListener("secret", (e) => {
e.reply({
inputs: Object.fromEntries(
Expand Down Expand Up @@ -149,7 +136,6 @@ export class TeamJob extends LitElement {
name="Chat"
.items=${this.conversation}
@conversationitemcreate=${(evt: ConversationItemCreateEvent) => {
this.inputValue = "";
this.#addConversationItem({
datetime: new Date(Date.now()),
who: Participant.USER,
Expand All @@ -164,7 +150,6 @@ export class TeamJob extends LitElement {
this.#run.provideInputs({ text: evt.message });
}}
.inputValue=${this.inputValue}
></at-conversation>
<team-activity
slot="slot-1"
Expand Down

0 comments on commit 04da6e0

Please sign in to comment.