flowchart TD
%% Main Entry Point and Initialization
Start([Application Start]) --> ParseArgs[Parse Command Line Arguments]
ParseArgs --> CheckStdin{Check stdin}
CheckStdin -->|Input Piped| ProcessPiped[Process Piped Input]
CheckStdin -->|Interactive Mode| CheckAuth{Authentication Status}
%% Authentication Flow
CheckAuth -->|Not Authenticated| OAuthFlow[OAuth Authentication]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <artifacts_info> | |
| The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
| # Good artifacts are... | |
| - Substantial content (>15 lines) | |
| - Content that the user is likely to modify, iterate on, or take ownership of | |
| - Self-contained, complex content that can be understood on its own, without context from the conversation | |
| - Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
| - Content likely to be referenced or reused multiple times |
- Create a file
Image.jsfrom the source below (it is almost a copy of Image.js from tiptap-extensions except that it has a constructor that acceptsuploadFunc(function to be called withimagebeing uploaded) and additional logicif(upload) { ... } else { ... previous base64 logic .. }in thenew Pluginsection.
import {Node, Plugin} from 'tiptap'
import {nodeInputRule} from 'tiptap-commands'
/**
* Matches following attributes in Markdown-typed image: [, alt, src, title]
*
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { AutoComplete } from 'antd'; | |
| import { AutoCompleteProps } from 'antd/lib/auto-complete'; | |
| import { Ref, useState } from 'react'; | |
| import React from 'react'; | |
| import useAutocomplete from '@/components/autocomplete/hook'; | |
| export default React.forwardRef((props: AutoCompleteProps, ref: Ref<AutoComplete>) => { | |
| const [search, setSearch] = useState<string>(''); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl 'https://www.seloger.com/annoncesbff/3/PointOfInterest' \ | |
| -H 'authority: www.seloger.com' \ | |
| -H 'cache-control: max-age=0' \ | |
| -H 'dnt: 1' \ | |
| -H 'content-type: application/json' \ | |
| -H 'accept: */*' \ | |
| -H 'origin: https://www.seloger.com' \ | |
| -H 'sec-fetch-site: same-origin' \ | |
| -H 'sec-fetch-mode: cors' \ | |
| -H 'sec-fetch-dest: empty' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // JSX Version by Adam Wathan: https://gist.github.com/adamwathan/e0a791aa0419098a7ece70028b2e641e | |
| import React, { ReactNode } from "react"; | |
| import { CSSTransition as ReactCSSTransition } from "react-transition-group"; | |
| import { useRef, useEffect, useContext } from "react"; | |
| interface TransitionProps { | |
| show?: boolean; | |
| enter?: string; | |
| enterFrom?: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from "react"; | |
| type ThemeConfig = "system" | "light" | "dark"; | |
| type ThemeName = "light" | "dark"; | |
| // Custom themes are keyed by a unique id. | |
| type KeyedThemes = { | |
| [k: string]: { | |
| config: ThemeConfig; | |
| themeName: ThemeName; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { Component } from "react"; | |
| import UserProfileMenu from "./UserProfileMenu"; | |
| function classNames(...classes) { return classes.filter(Boolean).join(" "); } | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { isToggleOn: false }; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Base build image | |
| FROM golang:latest as build-env | |
| # All these steps will be cached | |
| RUN mkdir /api | |
| WORKDIR /api | |
| COPY go.mod . | |
| COPY go.sum . | |
| # Get dependancies - will also be cached if we won't change mod/sum | |
| RUN go mod download |
NewerOlder