PromptInputStashNotice.tsx
components/PromptInput/PromptInputStashNotice.tsx
25
Lines
2291
Bytes
1
Exports
4
Imports
10
Keywords
What this is
This page documents one file from the repository and includes its full source so you can read it without leaving the docs site.
Beginner explanation
This file is one piece of the larger system. Its name, directory, imports, and exports show where it fits. Start by reading the exports and related files first.
How it is used
Start from the exports list and related files. Those are the easiest clues for where this file fits into the system.
Expert explanation
Architecturally, this file intersects with ui-flow. It contains 25 lines, 4 detected imports, and 1 detected exports.
Important relationships
- components/PromptInput/HistorySearchInput.tsx
- components/PromptInput/IssueFlagBanner.tsx
- components/PromptInput/Notifications.tsx
- components/PromptInput/PromptInput.tsx
- components/PromptInput/PromptInputFooter.tsx
- components/PromptInput/PromptInputFooterLeftSide.tsx
- components/PromptInput/PromptInputFooterSuggestions.tsx
- components/PromptInput/PromptInputHelpMenu.tsx
Detected exports
PromptInputStashNotice
Keywords
reactfigurestexthasstashcompiler-runtimepromptinputstashnoticesymbolmemo_cache_sentinelpaddingleftdimcolor
Detected imports
react/compiler-runtimefiguresreactsrc/ink.js
Source notes
This page embeds the full file contents. Small or leaf files are still indexed honestly instead of being over-explained.
Full source
import { c as _c } from "react/compiler-runtime";
import figures from 'figures';
import * as React from 'react';
import { Box, Text } from 'src/ink.js';
type Props = {
hasStash: boolean;
};
export function PromptInputStashNotice(t0) {
const $ = _c(1);
const {
hasStash
} = t0;
if (!hasStash) {
return null;
}
let t1;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t1 = <Box paddingLeft={2}><Text dimColor={true}>{figures.pointerSmall} Stashed (auto-restores after submit)</Text></Box>;
$[0] = t1;
} else {
t1 = $[0];
}
return t1;
}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJmaWd1cmVzIiwiUmVhY3QiLCJCb3giLCJUZXh0IiwiUHJvcHMiLCJoYXNTdGFzaCIsIlByb21wdElucHV0U3Rhc2hOb3RpY2UiLCJ0MCIsIiQiLCJfYyI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