Skip to content

Commit 9233856

Browse files
authored
feat(opentrons-ai-client): add Serial dilution as an option (#17049)
<!-- Thanks for taking the time to open a Pull Request (PR)! Please make sure you've read the "Opening Pull Requests" section of our Contributing Guide: https://github.com/Opentrons/opentrons/blob/edge/CONTRIBUTING.md#opening-pull-requests GitHub provides robust markdown to format your PR. Links, diagrams, pictures, and videos along with text formatting make it possible to create a rich and informative PR. For more information on GitHub markdown, see: https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax To ensure your code is reviewed quickly and thoroughly, please fill out the sections below to the best of your ability! --> # Overview This adds `Serial dilution` to Application choices ![image](https://github.com/user-attachments/assets/29764e18-cac8-43eb-87ac-5a9b8bec1612) Closes AUTH-1114 <!-- Describe your PR at a high level. State acceptance criteria and how this PR fits into other work. Link issues, PRs, and other relevant resources. --> ## Test Plan and Hands on Testing Go to OpentronsAI and check indeed `Serial dilution` exists <!-- Describe your testing of the PR. Emphasize testing not reflected in the code. Attach protocols, logs, screenshots and any other assets that support your testing. --> ## Changelog <!-- List changes introduced by this PR considering future developers and the end user. Give careful thought and clear documentation to breaking changes. --> ## Review requests Open UI and check indeed `Serial dilution` exists <!-- - What do you need from reviewers to feel confident this PR is ready to merge? - Ask questions. --> ## Risk assessment Low <!-- - Indicate the level of attention this PR needs. - Provide context to guide reviewers. - Discuss trade-offs, coupling, and side effects. - Look for the possibility, even if you think it's small, that your change may affect some other part of the system. - For instance, changing return tip behavior may also change the behavior of labware calibration. - How do your unit tests and on hands on testing mitigate this PR's risks and the risk of future regressions? - Especially in high risk PRs, explain how you know your testing is enough. -->
1 parent 0644df1 commit 9233856

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

opentrons-ai-client/src/assets/localization/en/create_protocol.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"application_scientific_dropdown_placeholder": "Select an option",
55
"basic_aliquoting": "Basic aliquoting",
66
"pcr": "PCR",
7+
"serial_dilution": "Serial dilution",
78
"other": "Other",
89
"application_other_title": "Other application",
910
"application_other_caption": "Example: “cherrypicking” or “serial dilution”",

opentrons-ai-client/src/molecules/ChatDisplay/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ function ParagraphText(props: JSX.IntrinsicAttributes): JSX.Element {
249249
{...props}
250250
fontSize={TYPOGRAPHY.fontSize20}
251251
lineHeight={TYPOGRAPHY.lineHeight24}
252+
css="white-space: pre-wrap;"
252253
/>
253254
)
254255
}

opentrons-ai-client/src/organisms/ApplicationSection/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ControlledInputField } from '../../atoms/ControlledInputField'
66

77
export const BASIC_ALIQUOTING = 'basic_aliquoting'
88
export const PCR = 'pcr'
9+
export const SERIAL_DILUTION = 'serial_dilution'
910
export const OTHER = 'other'
1011
export const APPLICATION_SCIENTIFIC_APPLICATION =
1112
'application.scientificApplication'
@@ -19,6 +20,7 @@ export function ApplicationSection(): JSX.Element | null {
1920
const options = [
2021
{ name: t(BASIC_ALIQUOTING), value: BASIC_ALIQUOTING },
2122
{ name: t(PCR), value: PCR },
23+
{ name: t(SERIAL_DILUTION), value: SERIAL_DILUTION },
2224
{ name: t(OTHER), value: OTHER },
2325
]
2426

opentrons-ai-client/src/resources/utils/createProtocolUtils.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@ export function generateChatPrompt(
162162
const defs = getOnlyLatestDefs()
163163

164164
const robotType = t(values.instruments.robot)
165-
const scientificApplication = t(values.application.scientificApplication)
166-
const description = values.application.description
165+
const scientificApplication = `- ${t(
166+
values.application.scientificApplication
167+
)}`
168+
const description = `- ${values.application.description}`
167169
const pipetteMounts =
168170
values.instruments.pipettes === TWO_PIPETTES
169171
? [
@@ -209,9 +211,7 @@ export function generateChatPrompt(
209211

210212
const prompt = `${t('create_protocol_prompt_robot', { robotType })}\n${t(
211213
'application_title'
212-
)}: \n${scientificApplication}\n\n${t(
213-
'description'
214-
)}: \n${description}\n\n${t(
214+
)}:\n${scientificApplication}\n\n${t('description')}:\n${description}\n\n${t(
215215
'pipette_mounts'
216216
)}:\n\n${pipetteMounts}${flexGripper}\n\n${t(
217217
'modules_title'

0 commit comments

Comments
 (0)