Skip to content

Commit

Permalink
chore: remove AI related prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
baurine committed Feb 16, 2023
1 parent 1aa47f7 commit 92a8263
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 65 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
export default `/* Getting Started: let AI generate SQL for you.
Type "-- + your instruction" and press "ENTER", to start AI journey with sample data of github events.
Review the SQL generated by AI, and accept it by press "Tab" or reject it by press "Esc". */
use sample_data;
/* Try typing this instruction and press "ENTER":
-- Find the most popular repo from github events */
// export default `/* Getting Started: let AI generate SQL for you.
// Type "-- + your instruction" and press "ENTER", to start AI journey with sample data of github events.
// Review the SQL generated by AI, and accept it by press "Tab" or reject it by press "Esc". */
// use sample_data;
// /* Try typing this instruction and press "ENTER":
// -- Find the most popular repo from github events */

/* To experience AI-generated SQL on your own dataset, please accept Privacy terms at first.
PingCAP values your data privacy as top priority.*/
/* DISCLAIMER:
The AI model may occasionally generate inaccurate SQL statement due to limitations of AI model.
You can edit the AI generated SQL statement as you like. */`
// /* To experience AI-generated SQL on your own dataset, please accept Privacy terms at first.
// PingCAP values your data privacy as top priority.*/
// /* DISCLAIMER:
// The AI model may occasionally generate inaccurate SQL statement due to limitations of AI model.
// You can edit the AI generated SQL statement as you like. */`

// export const preTips = `/* Enter "USE {database};" to start exploring your data.`
// export const affixTips = ` Type "-- your instruction" followed by the Enter key to try out AI-generated SQL queries.*/`
Expand All @@ -18,3 +18,5 @@ export const preTips = `/* Enter "USE {database};" to start exploring your data.
export const affixTips = ``

export const newFileContent = `${preTips}\n${affixTips}\nUSE `

export default preTips
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tiunimanager-ui",
"version": "1.1.0-beta.3",
"version": "1.1.0-beta.4",
"private": true,
"license": "Apache-2.0",
"scripts": {
Expand Down
100 changes: 47 additions & 53 deletions types/macros.d.ts
Original file line number Diff line number Diff line change
@@ -1,65 +1,59 @@
declare module '@i18n-macro' {
/** load i18n resources by glob pattern. */
export function loadI18n(glob?: string): void
/** load i18n resources by glob pattern. */
export function loadI18nWithNS(ns: string, glob?: string): void
import { UseTranslationResponse } from 'react-i18next'
/** a wrapper of useTranslation(), with auto namespace management. */
export function useI18n(): UseTranslationResponse<''>
import { TFunction } from 'i18next'
/** a wrapper of i18next.t(), with auto namespace management. */
export function getI18n(): TFunction
/** get the i18n namespace for the current file. */
export function resolveNamespace(): string
/** load i18n resources by glob pattern. */
export function loadI18n(glob?: string): void
/** load i18n resources by glob pattern. */
export function loadI18nWithNS(ns: string, glob?: string): void
import { UseTranslationResponse } from 'react-i18next'
/** a wrapper of useTranslation(), with auto namespace management. */
export function useI18n(): UseTranslationResponse<''>
import { TFunction } from 'i18next'
/** a wrapper of i18next.t(), with auto namespace management. */
export function getI18n(): TFunction
/** get the i18n namespace for the current file. */
export function resolveNamespace(): string
}
declare module '@i18n-macro-helper' {
import { TFunction } from 'i18next'
export function onI18nInitialized(hook: () => void): void
export function withNamespace(ns: string | string[]): TFunction

import { TFunction } from 'i18next'
export function onI18nInitialized(hook: () => void): void;
export function withNamespace(ns: string | string[]): TFunction;

}
declare module '@assets-macro' {
/** import all assets by glob pattern. */
export function importAssets(glob: string): void
/** import all assets by glob pattern. */
export function importAssets(glob: string): void
}
declare module '@pages-macro' {
import { ComponentType } from 'react'
export interface IRoute<T> {
id: string
defaultName: string
path: string
exact: boolean
sync: boolean
component: ComponentType<any>
meta: T
children: IRoute<T>[]
}
/** get routes tree by the path of the root directory of pages and the prefix of target routes. */
export function loadRoutes<T>(pagesPath: string, prefix?: string): IRoute<T>

export interface IMenuItem<T> {
id: string
defaultName: string
path: string
meta: T
children: IMenuItem<T>[]
}
/** get menu tree by the path of the root directory of pages and the route prefix of these menus.
import { ComponentType } from 'react'
export interface IRoute<T> {
id: string
defaultName: string
path: string
exact: boolean
sync: boolean
component: ComponentType<any>
meta: T
children: IRoute<T>[]
}
/** get routes tree by the path of the root directory of pages and the prefix of target routes. */
export function loadRoutes<T>(pagesPath: string, prefix?: string): IRoute<T>

export interface IMenuItem<T> {
id: string
defaultName: string
path: string
meta: T
children: IMenuItem<T>[]
}
/** get menu tree by the path of the root directory of pages and the route prefix of these menus.
if prefix is left unset, the route of the current file will be used as the route prefix of the menus. */
export function loadMenus<T>(
pagesPath: string,
prefix?: string
): IMenuItem<T>[]
/** get the route path by relative path.
export function loadMenus<T>(pagesPath: string, prefix?: string): IMenuItem<T>[]
/** get the route path by relative path.
if relativePath is left unset, returns the route path of current file. */
export function resolveRoute(
relativePath?: string,
...params: string[]
): string
export function resolveRoute(relativePath?: string, ...params: string[]): string
}
declare module '@components-macro' {
import { ReactElement, ComponentType } from 'react'
export function wrap(
target: ReactElement,
...wrappers: ComponentType[]
): ReactElement
}
import { ReactElement, ComponentType } from 'react'
export function wrap(target: ReactElement, ...wrappers: ComponentType[]): ReactElement
}

0 comments on commit 92a8263

Please sign in to comment.